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
ca995093
Commit
ca995093
authored
Feb 23, 2020
by
Henrik Christian Grove
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Even more specs
parent
1f1226ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
spec/lib/backup/manager_spec.rb
spec/lib/backup/manager_spec.rb
+24
-0
No files found.
spec/lib/backup/manager_spec.rb
View file @
ca995093
...
...
@@ -214,6 +214,30 @@ describe Backup::Manager do
end
end
describe
'verify_restore'
do
context
'on Version mismatch'
do
let
(
:gitlab_version
)
{
Gitlab
::
VERSION
}
it
'stops the process'
do
allow
(
YAML
).
to
receive
(
:load_file
)
.
and_return
({
gitlab_version:
"not
#{
gitlab_version
}
"
})
expect
{
subject
.
verify_restore
}.
to
raise_error
SystemExit
end
end
context
'on Version match'
do
let
(
:gitlab_version
)
{
Gitlab
::
VERSION
}
it
'does nothing'
do
allow
(
YAML
).
to
receive
(
:load_file
)
.
and_return
({
gitlab_version:
"
#{
gitlab_version
}
"
})
expect
{
subject
.
verify_restore
}.
not_to
raise_error
end
end
end
describe
'#unpack'
do
context
'when there are no backup files in the directory'
do
before
do
...
...
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