X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4aee7d57faff02fc6b7b6f750dc22a29e58bb963..cc8174aca759773fa661bd9172f877b2d639576b:/services/api/lib/tasks/symbols.rake diff --git a/services/api/lib/tasks/symbols.rake b/services/api/lib/tasks/symbols.rake index a2e6df8b58..dc9ed461dd 100644 --- a/services/api/lib/tasks/symbols.rake +++ b/services/api/lib/tasks/symbols.rake @@ -4,7 +4,12 @@ require 'current_api_client' -include CurrentApiClient +# This is needed instead of just including CurrentApiClient so that its +# methods don't get imported as Object's class methods; this is a problem because +# the methods would be imported only on test environment. See #15716 for more info. +class CurrentApiClientHelper + extend CurrentApiClient +end def has_symbols? x if x.is_a? Hash @@ -83,7 +88,7 @@ namespace :symbols do Node, PipelineInstance, PipelineTemplate, Repository, Specimen, Trait, User, VirtualMachine, Workflow].each do |klass| - act_as_system_user do + CurrentApiClientHelper.act_as_system_user do klass.all.each do |c| check_for_serialized_symbols c end @@ -99,7 +104,7 @@ namespace :symbols do Node, PipelineInstance, PipelineTemplate, Repository, Specimen, Trait, User, VirtualMachine, Workflow].each do |klass| - act_as_system_user do + CurrentApiClientHelper.act_as_system_user do klass.all.each do |c| stringify_serialized_symbols c end