[DRE-commits] [ruby-logging] 03/03: Disable assertions not working when run by root

Hleb Valoshka tsfgnu-guest at moszumanska.debian.org
Wed Jul 22 18:30:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

tsfgnu-guest pushed a commit to branch patch-queue/master
in repository ruby-logging.

commit 376e26619b13c3e4640eee61639ea8b30dc3b05d
Author: Hleb Valoshka <375gnu at gmail.com>
Date:   Wed Jul 15 12:58:23 2015 +0300

    Disable assertions not working when run by root
    
    	Root user can write to readonly files
---
 test/appenders/test_file.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/appenders/test_file.rb b/test/appenders/test_file.rb
index a31dd89..c3b83b2 100644
--- a/test/appenders/test_file.rb
+++ b/test/appenders/test_file.rb
@@ -24,7 +24,7 @@ module TestAppenders
       log = File.join(TMP, 'uw_dir', 'file.log')
       assert_raise(ArgumentError) do
         Logging.appenders.file.assert_valid_logfile(log)
-      end
+      end if Process.euid != 0
 
       log = File.join(TMP, 'dir')
       assert_raise(ArgumentError) do
@@ -34,7 +34,7 @@ module TestAppenders
       log = File.join(TMP, 'uw_file')
       assert_raise(ArgumentError) do
         Logging.appenders.file.assert_valid_logfile(log)
-      end
+      end if Process.euid != 0
 
       log = File.join(TMP, 'file.log')
       assert Logging.appenders.file.assert_valid_logfile(log)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-logging.git



More information about the Pkg-ruby-extras-commits mailing list