From 489fdac7bed0750f09d65b6105cb0b70d7ccf61f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 19 Jan 2016 20:44:50 +0000 Subject: test_clogger: add test for REMOTE_USER This wasn't tested before, and we ought to ensure it works since it's rarely-used. --- test/test_clogger.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/test_clogger.rb') diff --git a/test/test_clogger.rb b/test/test_clogger.rb index 953152e..ca3bd55 100644 --- a/test/test_clogger.rb +++ b/test/test_clogger.rb @@ -147,6 +147,7 @@ class TestClogger < Test::Unit::TestCase req = { 'HTTP_HOST' => 'example.com:12345', 'HTTP_COOKIE' => cookie, + 'REMOTE_USER' => 'foo_user', } req = @req.merge(req) body = cl.call(req).last @@ -154,6 +155,7 @@ class TestClogger < Test::Unit::TestCase body.close str = str.string assert(str.size > 128) + assert_equal 'foo_user', str.split(' ')[2] assert_match %r["echo and socat \\o/" "#{cookie}" \d+\.\d{3}], str assert_match %r["#{cookie}" \d+\.\d{3} example\.com:12345\n\z], str end -- cgit v1.2.3-24-ge0c7