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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2771c42e
Commit
2771c42e
authored
Jan 20, 2022
by
Pedro Pombeiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that users without permissions don't see project runners
parent
cb110c33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
spec/requests/api/graphql/ci/runner_spec.rb
spec/requests/api/graphql/ci/runner_spec.rb
+8
-0
No files found.
spec/requests/api/graphql/ci/runner_spec.rb
View file @
2771c42e
...
...
@@ -25,6 +25,8 @@ RSpec.describe 'Query.runner(id)' do
access_level:
0
,
tag_list:
%w[tag1 tag2]
,
run_untagged:
true
,
executor_type: :shell
)
end
let_it_be
(
:active_project_runner
)
{
create
(
:ci_runner
,
:project
)
}
def
get_runner
(
id
)
case
id
when
:active_instance_runner
...
...
@@ -33,6 +35,8 @@ RSpec.describe 'Query.runner(id)' do
inactive_instance_runner
when
:active_group_runner
active_group_runner
when
:active_project_runner
active_project_runner
end
end
...
...
@@ -381,6 +385,10 @@ RSpec.describe 'Query.runner(id)' do
context
'on group runner'
do
it_behaves_like
'retrieval by unauthorized user'
,
:active_group_runner
end
context
'on project runner'
do
it_behaves_like
'retrieval by unauthorized user'
,
:active_project_runner
end
end
describe
'by non-admin user'
do
...
...
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