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
bd3f7118
Commit
bd3f7118
authored
Feb 04, 2021
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs, Authorization header not required for this endpoint
parent
16a9be62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/requests/api/internal/kubernetes_spec.rb
spec/requests/api/internal/kubernetes_spec.rb
+4
-4
No files found.
spec/requests/api/internal/kubernetes_spec.rb
View file @
bd3f7118
...
...
@@ -62,25 +62,25 @@ RSpec.describe API::Internal::Kubernetes do
let!
(
:agent_token
)
{
create
(
:cluster_agent_token
)
}
it
'returns no_content for valid gitops_sync_count'
do
send_request
(
params:
{
gitops_sync_count:
10
}
,
headers:
{
'Authorization'
=>
"Bearer
#{
agent_token
.
token
}
"
}
)
send_request
(
params:
{
gitops_sync_count:
10
})
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
end
it
'returns no_content 0 gitops_sync_count'
do
send_request
(
params:
{
gitops_sync_count:
0
}
,
headers:
{
'Authorization'
=>
"Bearer
#{
agent_token
.
token
}
"
}
)
send_request
(
params:
{
gitops_sync_count:
0
})
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
end
it
'returns 400 for non number'
do
send_request
(
params:
{
gitops_sync_count:
'string'
}
,
headers:
{
'Authorization'
=>
"Bearer
#{
agent_token
.
token
}
"
}
)
send_request
(
params:
{
gitops_sync_count:
'string'
})
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
end
it
'returns 400 for negative number'
do
send_request
(
params:
{
gitops_sync_count:
'-1'
}
,
headers:
{
'Authorization'
=>
"Bearer
#{
agent_token
.
token
}
"
}
)
send_request
(
params:
{
gitops_sync_count:
'-1'
})
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
end
...
...
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