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
d800bd28
Commit
d800bd28
authored
Jun 05, 2019
by
Ash McKenzie
Committed by
Toon Claes
Jun 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quarantine failing Geo tests
parent
501c3453
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
ee/spec/controllers/admin/geo/uploads_controller_spec.rb
ee/spec/controllers/admin/geo/uploads_controller_spec.rb
+16
-8
No files found.
ee/spec/controllers/admin/geo/uploads_controller_spec.rb
View file @
d800bd28
...
@@ -21,7 +21,8 @@ describe Admin::Geo::UploadsController, :geo do
...
@@ -21,7 +21,8 @@ describe Admin::Geo::UploadsController, :geo do
shared_examples
'license required'
do
shared_examples
'license required'
do
context
'without a valid license'
do
context
'without a valid license'
do
it
'redirects to license page with a flash message'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'redirects to license page with a flash message'
,
:quarantine
do
expect
(
subject
).
to
redirect_to
(
admin_license_path
)
expect
(
subject
).
to
redirect_to
(
admin_license_path
)
expect
(
flash
[
:alert
]).
to
include
(
'You need a different license to use Geo replication'
)
expect
(
flash
[
:alert
]).
to
include
(
'You need a different license to use Geo replication'
)
end
end
...
@@ -41,13 +42,15 @@ describe Admin::Geo::UploadsController, :geo do
...
@@ -41,13 +42,15 @@ describe Admin::Geo::UploadsController, :geo do
stub_current_geo_node
(
secondary
)
stub_current_geo_node
(
secondary
)
end
end
it
'renders the index template'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'renders the index template'
,
:quarantine
do
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
subject
).
to
render_template
(
:index
)
expect
(
subject
).
to
render_template
(
:index
)
end
end
context
'without sync_status specified'
do
context
'without sync_status specified'
do
it
'renders all registries'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'renders all registries'
,
:quarantine
do
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
response
.
body
).
to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
to
have_css
(
css_id
(
failed_registry
))
expect
(
response
.
body
).
to
have_css
(
css_id
(
failed_registry
))
...
@@ -58,7 +61,8 @@ describe Admin::Geo::UploadsController, :geo do
...
@@ -58,7 +61,8 @@ describe Admin::Geo::UploadsController, :geo do
context
'with sync_status=synced'
do
context
'with sync_status=synced'
do
subject
{
get
:index
,
params:
{
sync_status:
'synced'
}
}
subject
{
get
:index
,
params:
{
sync_status:
'synced'
}
}
it
'renders only synced registries'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'renders only synced registries'
,
:quarantine
do
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
response
.
body
).
to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
failed_registry
))
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
failed_registry
))
...
@@ -69,7 +73,8 @@ describe Admin::Geo::UploadsController, :geo do
...
@@ -69,7 +73,8 @@ describe Admin::Geo::UploadsController, :geo do
context
'with sync_status=failed'
do
context
'with sync_status=failed'
do
subject
{
get
:index
,
params:
{
sync_status:
'failed'
}
}
subject
{
get
:index
,
params:
{
sync_status:
'failed'
}
}
it
'renders only failed registries'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'renders only failed registries'
,
:quarantine
do
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
to
have_css
(
css_id
(
failed_registry
))
expect
(
response
.
body
).
to
have_css
(
css_id
(
failed_registry
))
...
@@ -80,7 +85,8 @@ describe Admin::Geo::UploadsController, :geo do
...
@@ -80,7 +85,8 @@ describe Admin::Geo::UploadsController, :geo do
context
'with sync_status=never'
do
context
'with sync_status=never'
do
subject
{
get
:index
,
params:
{
sync_status:
'never'
}
}
subject
{
get
:index
,
params:
{
sync_status:
'never'
}
}
it
'renders only never synced registries'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'renders only never synced registries'
,
:quarantine
do
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
subject
).
to
have_gitlab_http_status
(
200
)
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
synced_registry
))
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
failed_registry
))
expect
(
response
.
body
).
not_to
have_css
(
css_id
(
failed_registry
))
...
@@ -105,7 +111,8 @@ describe Admin::Geo::UploadsController, :geo do
...
@@ -105,7 +111,8 @@ describe Admin::Geo::UploadsController, :geo do
context
'with an orphaned registry'
do
context
'with an orphaned registry'
do
let
(
:upload_registry
)
{
create
(
:geo_file_registry
,
success:
true
)
}
let
(
:upload_registry
)
{
create
(
:geo_file_registry
,
success:
true
)
}
it
'removes the registry'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'removes the registry'
,
:quarantine
do
upload_registry
.
update_column
(
:file_id
,
-
1
)
upload_registry
.
update_column
(
:file_id
,
-
1
)
expect
(
subject
).
to
redirect_to
(
admin_geo_uploads_path
)
expect
(
subject
).
to
redirect_to
(
admin_geo_uploads_path
)
...
@@ -117,7 +124,8 @@ describe Admin::Geo::UploadsController, :geo do
...
@@ -117,7 +124,8 @@ describe Admin::Geo::UploadsController, :geo do
context
'with a regular registry'
do
context
'with a regular registry'
do
let
(
:upload_registry
)
{
create
(
:geo_file_registry
,
:avatar
,
:with_file
,
success:
true
)
}
let
(
:upload_registry
)
{
create
(
:geo_file_registry
,
:avatar
,
:with_file
,
success:
true
)
}
it
'does not delete the registry and gives an error'
do
# Failure issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/11957
it
'does not delete the registry and gives an error'
,
:quarantine
do
expect
(
subject
).
to
redirect_to
(
admin_geo_uploads_path
)
expect
(
subject
).
to
redirect_to
(
admin_geo_uploads_path
)
expect
(
flash
[
:alert
]).
to
include
(
'Could not remove tracking entry'
)
expect
(
flash
[
:alert
]).
to
include
(
'Could not remove tracking entry'
)
expect
{
Geo
::
UploadRegistry
.
find
(
upload_registry
.
id
)
}.
not_to
raise_error
expect
{
Geo
::
UploadRegistry
.
find
(
upload_registry
.
id
)
}.
not_to
raise_error
...
...
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