X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/79bce4a71a58118a9003882e0ca9bbfb9d2957a9..7435f58364e90b8bf75db21602592ff0e7559b48:/services/api/test/test_helper.rb diff --git a/services/api/test/test_helper.rb b/services/api/test/test_helper.rb index 5dc77cb98a..08696a9983 100644 --- a/services/api/test/test_helper.rb +++ b/services/api/test/test_helper.rb @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: AGPL-3.0 -require 'update_permissions' +require_relative '../lib/update_permissions' ENV["RAILS_ENV"] = "test" unless ENV["NO_COVERAGE_TEST"] @@ -25,7 +25,6 @@ unless ENV["NO_COVERAGE_TEST"] SimpleCov.start do add_filter '/test/' add_filter 'initializers/secret_token' - add_filter 'initializers/omniauth' end rescue Exception => e $stderr.puts "SimpleCov unavailable (#{e}). Proceeding without." @@ -123,6 +122,7 @@ class ActiveSupport::TestCase def set_user_from_auth(auth_name) client_auth = api_client_authorizations(auth_name) + client_auth.user.forget_cached_group_perms Thread.current[:api_client_authorization] = client_auth Thread.current[:api_client] = client_auth.api_client Thread.current[:user] = client_auth.user