diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-08-15 16:46:14 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-08-15 16:48:32 -0500 |
commit | 710f75186009cb85c996d0de723ec3524299ecd8 (patch) | |
tree | fffd9f99b45b063e318c0e954116c98647737ef9 | |
parent | 0a0ee0ab2ae20ec25a25f335f47e74536daccc3e (diff) | |
download | gitlab-shell-710f75186009cb85c996d0de723ec3524299ecd8.tar.gz |
Disable WEBrick logging in HTTPUNIXServer to reduce spec output noisers-rspec
-rw-r--r-- | spec/support/http_unix_server.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/http_unix_server.rb b/spec/support/http_unix_server.rb index d786238..113df57 100644 --- a/spec/support/http_unix_server.rb +++ b/spec/support/http_unix_server.rb @@ -2,6 +2,12 @@ require 'webrick' # like WEBrick::HTTPServer, but listens on UNIX socket class HTTPUNIXServer < WEBrick::HTTPServer + def initialize(config = {}) + null_log = WEBrick::Log.new(IO::NULL, 7) + + super(config.merge(Logger: null_log, AccessLog: null_log)) + end + def listen(address, port) socket = Socket.unix_server_socket(address) socket.autoclose = false |