X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/dfc4c2c74dc7a31ff0c0d307846b7e9525fdcf0e..d4ed3e6460469f2766e1f1676c538d6c86e000b6:/apps/workbench/test/controllers/healthcheck_controller_test.rb diff --git a/apps/workbench/test/controllers/healthcheck_controller_test.rb b/apps/workbench/test/controllers/healthcheck_controller_test.rb index 9a63a29e8f..c3a0ddea90 100644 --- a/apps/workbench/test/controllers/healthcheck_controller_test.rb +++ b/apps/workbench/test/controllers/healthcheck_controller_test.rb @@ -5,6 +5,9 @@ require 'test_helper' class HealthcheckControllerTest < ActionController::TestCase + reset_api_fixtures :after_each_test, false + reset_api_fixtures :after_suite, false + [ [false, nil, 404, 'disabled'], [true, nil, 401, 'authorization required'], @@ -13,7 +16,11 @@ class HealthcheckControllerTest < ActionController::TestCase [true, 'Bearer configuredmanagementtoken', 200, '{"health":"OK"}'], ].each do |enabled, header, error_code, error_msg| test "ping when #{if enabled then 'enabled' else 'disabled' end} with header '#{header}'" do - Rails.configuration.ManagementToken = 'configuredmanagementtoken' if enabled + if enabled + Rails.configuration.ManagementToken = 'configuredmanagementtoken' + else + Rails.configuration.ManagementToken = "" + end @request.headers['Authorization'] = header get :ping