Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
1fcc9ad7
Commit
1fcc9ad7
authored
May 23, 2018
by
Kamil Trzciński
Committed by
Dylan Griffith
May 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `register_job_service_spec` failures
parent
8d5d6ada
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/services/ci/register_job_service.rb
app/services/ci/register_job_service.rb
+2
-1
spec/services/ci/register_job_service_spec.rb
spec/services/ci/register_job_service_spec.rb
+1
-1
No files found.
app/services/ci/register_job_service.rb
View file @
1fcc9ad7
...
...
@@ -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
...
...
spec/services/ci/register_job_service_spec.rb
View file @
1fcc9ad7
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment