test/soap/auth/test_basic.rb in soap4r-1.5.7 vs test/soap/auth/test_basic.rb in soap4r-1.5.8
- old
+ new
@@ -13,23 +13,23 @@
Port = 17171
ProxyPort = 17172
def setup
@logger = Logger.new(STDERR)
- @logger.level = Logger::Severity::ERROR
+ @logger.level = Logger::Severity::FATAL
@url = "http://localhost:#{Port}/"
@proxyurl = "http://localhost:#{ProxyPort}/"
@server = @proxyserver = @client = nil
@server_thread = @proxyserver_thread = nil
setup_server
setup_client
end
def teardown
- teardown_client
+ teardown_client if @server
teardown_proxyserver if @proxyserver
- teardown_server
+ teardown_server if @client
end
def setup_server
@server = WEBrick::HTTPServer.new(
:BindAddress => "0.0.0.0",
@@ -39,9 +39,10 @@
:DocumentRoot => File.dirname(File.expand_path(__FILE__))
)
htpasswd = File.join(File.dirname(__FILE__), 'htpasswd')
htpasswd_userdb = WEBrick::HTTPAuth::Htpasswd.new(htpasswd)
@basic_auth = WEBrick::HTTPAuth::BasicAuth.new(
+ :Logger => @logger,
:Realm => 'auth',
:UserDB => htpasswd_userdb
)
@server.mount(
'/',