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
33955934
Commit
33955934
authored
Nov 30, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spec, add json schema
parent
fd6dfbec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
spec/fixtures/api/schemas/geo_project_registry.json
spec/fixtures/api/schemas/geo_project_registry.json
+26
-0
spec/requests/api/geo_nodes_spec.rb
spec/requests/api/geo_nodes_spec.rb
+3
-3
No files found.
spec/fixtures/api/schemas/geo_project_registry.json
0 → 100644
View file @
33955934
{
"type"
:
"array"
,
"required"
:
[
"project_id"
,
"last_repository_synced_at"
,
"last_repository_successful_sync_at"
,
"last_wiki_synced_at"
,
"last_wiki_successful_sync_at"
,
"repository_retry_count"
,
"wiki_retry_count"
,
"last_repository_sync_failure"
,
"last_wiki_sync_failure"
],
"properties"
:
{
"project_id"
:
{
"type"
:
"integer"
},
"last_repository_synced_at"
:
{
"type"
:
[
"string"
]
},
"last_repository_successful_sync_at"
:
{
"type"
:
[
"string"
]
},
"last_wiki_synced_at"
:
{
"type"
:
[
"string"
]
},
"last_wiki_successful_sync_at"
:
{
"type"
:
[
"string"
]
},
"repository_retry_count"
:
{
"type"
:
"integer"
},
"wiki_retry_count"
:
{
"type"
:
"integer"
},
"last_repository_sync_failure"
:
{
"type"
:
[
"string"
]
},
"last_wiki_sync_failure"
:
{
"type"
:
[
"string"
]
}
},
"additionalProperties"
:
false
}
spec/requests/api/geo_nodes_spec.rb
View file @
33955934
...
...
@@ -98,13 +98,13 @@ describe API::GeoNodes, :geo, api: true do
get
api
(
"/geo_nodes/
#{
secondary
.
id
}
/failures"
,
admin
)
expect
(
response
.
status
).
to
eq
200
expect
(
response
.
body
).
to
eq
(
'
'
)
expect
(
response
).
to
match_response_schema
(
'geo_project_registry
'
)
end
it
'denies access if not admin'
do
get
api
(
'/geo_nodes'
,
user
)
get
api
(
"/geo_nodes/
#{
secondary
.
id
}
/failures"
,
user
)
expect
(
response
.
failure
s
).
to
eq
403
expect
(
response
.
statu
s
).
to
eq
403
end
end
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