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
233cfb85
Commit
233cfb85
authored
Mar 16, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for Geo health check
parent
8bc078cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
spec/lib/gitlab/geo/health_check_spec.rb
spec/lib/gitlab/geo/health_check_spec.rb
+33
-0
No files found.
spec/lib/gitlab/geo/health_check_spec.rb
0 → 100644
View file @
233cfb85
require
'spec_helper'
describe
Gitlab
::
Geo
::
HealthCheck
do
let!
(
:secondary
)
{
create
(
:geo_node
,
:current
)
}
subject
{
described_class
}
describe
'.perform_checks'
do
it
'returns an empty string when not running on a secondary node'
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
)
{
false
}
expect
(
subject
.
perform_checks
).
to
be_blank
end
it
'returns an error when configuration file is missing for tracking DB'
do
allow
(
Rails
.
configuration
).
to
receive
(
:respond_to?
).
with
(
:geo_database
)
{
false
}
expect
(
subject
.
perform_checks
).
not_to
be_blank
end
it
'returns an error when Geo database version does not match the latest migration version'
do
allow
(
subject
).
to
receive
(
:get_database_version
)
{
1
}
expect
(
subject
.
perform_checks
).
not_to
be_blank
end
it
'returns an error when latest migration version does not match the Geo database version'
do
allow
(
subject
).
to
receive
(
:get_migration_version
)
{
1
}
expect
(
subject
.
perform_checks
).
not_to
be_blank
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