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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
6b8c2ea8
Commit
6b8c2ea8
authored
Mar 28, 2017
by
author Jacob Vosmaer jacob@gitlab.com 1490710538 +0200
Committed by
Jacob Vosmaer
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow backup tests to run locally
parent
1904c80f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
spec/tasks/gitlab/backup_rake_spec.rb
spec/tasks/gitlab/backup_rake_spec.rb
+7
-3
No files found.
spec/tasks/gitlab/backup_rake_spec.rb
View file @
6b8c2ea8
...
...
@@ -81,6 +81,10 @@ describe 'gitlab:app namespace rake task' do
end
# backup_restore task
describe
'backup'
do
before
(
:all
)
do
ENV
[
'force'
]
=
'yes'
end
def
tars_glob
Dir
.
glob
(
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
'*_gitlab_backup.tar'
))
end
...
...
@@ -88,6 +92,9 @@ describe 'gitlab:app namespace rake task' do
def
create_backup
FileUtils
.
rm
tars_glob
# This reconnect makes our project fixture disappear, breaking the restore. Stub it out.
allow
(
ActiveRecord
::
Base
.
connection
).
to
receive
(
:reconnect!
)
# Redirect STDOUT and run the rake task
orig_stdout
=
$stdout
$stdout
=
StringIO
.
new
...
...
@@ -119,9 +126,6 @@ describe 'gitlab:app namespace rake task' do
FileUtils
.
mkdir_p
(
path
)
FileUtils
.
touch
(
File
.
join
(
path
,
"dummy.txt"
))
# We need to use the full path instead of the relative one
allow
(
Gitlab
.
config
.
gitlab_shell
).
to
receive
(
:path
).
and_return
(
File
.
expand_path
(
Gitlab
.
config
.
gitlab_shell
.
path
,
Rails
.
root
.
to_s
))
ENV
[
"SKIP"
]
=
"db"
create_backup
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