Fix `register_job_service_spec` failures
This commit is contained in:
parent
8d5d6ada5e
commit
1fcc9ad7bb
|
@ -90,7 +90,8 @@ module Ci
|
|||
|
||||
def builds_for_group_runner
|
||||
# Workaround for weird Rails bug, that makes `runner.groups.to_sql` to return `runner_id = NULL`
|
||||
groups = Group.joins(:runner_namespaces).where(runner_namespaces: { runner_id: runner })
|
||||
groups = Group.joins(:runner_namespaces).merge(runner.runner_namespaces)
|
||||
|
||||
hierarchy_groups = Gitlab::GroupHierarchy.new(groups).base_and_descendants
|
||||
projects = Project.where(namespace_id: hierarchy_groups)
|
||||
.with_group_runners_enabled
|
||||
|
|
|
@ -320,7 +320,7 @@ module Ci
|
|||
end
|
||||
|
||||
context 'when access_level of runner is ref_protected' do
|
||||
let!(:specific_runner) { create(:ci_runner, :ref_protected, :specific) }
|
||||
let!(:specific_runner) { create(:ci_runner, :project, :ref_protected, projects: [project]) }
|
||||
|
||||
context 'when a job is protected' do
|
||||
let!(:pending_job) { create(:ci_build, :protected, pipeline: pipeline) }
|
||||
|
|
Loading…
Reference in New Issue