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
f2293b58
Commit
f2293b58
authored
Apr 02, 2020
by
Grzegorz Bizon
Committed by
Matt Kasa
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix existing tests for terraform state backend
parent
0d4e1ad3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
spec/requests/api/terraform/state_spec.rb
spec/requests/api/terraform/state_spec.rb
+6
-2
No files found.
spec/requests/api/terraform/state_spec.rb
View file @
f2293b58
...
...
@@ -23,6 +23,7 @@ describe API::Terraform::State do
describe
'GET /projects/:id/terraform/state/:name'
do
it
'returns 401 if user is not authenticated'
do
headers
=
{
'HTTP_AUTHORIZATION'
=>
'failing_token'
}
get
api
(
"/projects/
#{
project
.
id
}
/terraform/state/
#{
state_name
}
"
),
headers:
headers
expect
(
response
).
to
have_gitlab_http_status
(
:unauthorized
)
...
...
@@ -43,6 +44,7 @@ describe API::Terraform::State do
it
'returns forbidden if the user cannot access the state'
do
project
.
add_developer
(
developer
)
get
api
(
"/projects/
#{
project
.
id
}
/terraform/state/
#{
state_name
}
"
),
headers:
auth_header_for
(
developer
)
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
...
...
@@ -62,7 +64,8 @@ describe API::Terraform::State do
it
'returns forbidden if the user cannot access the state'
do
project
.
add_developer
(
developer
)
get
api
(
"/projects/
#{
project
.
id
}
/terraform/state/
#{
state_name
}
"
),
headers:
auth_header_for
(
developer
)
post
api
(
"/projects/
#{
project
.
id
}
/terraform/state/
#{
state_name
}
"
),
headers:
auth_header_for
(
developer
)
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
end
...
...
@@ -89,7 +92,8 @@ describe API::Terraform::State do
it
'returns forbidden if the user cannot access the state'
do
project
.
add_developer
(
developer
)
get
api
(
"/projects/
#{
project
.
id
}
/terraform/state/
#{
state_name
}
"
),
headers:
auth_header_for
(
developer
)
delete
api
(
"/projects/
#{
project
.
id
}
/terraform/state/
#{
state_name
}
"
),
headers:
auth_header_for
(
developer
)
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
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