Merge branch 'main' into 18842-arv-mount-disk-config
[arvados.git] / services / api / test / test_helper.rb
index 5dc77cb98aeaa9cb7758576042e6705d29ef7f22..843d4f1b23fccfb8777883c3021ab54187b3cf57 100644 (file)
@@ -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