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
567baf0e
Commit
567baf0e
authored
Oct 10, 2017
by
Rémy Coutable
Committed by
Winnie Hellmann
Oct 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub ENV in the backup task spec file
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
be2c6657
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
188 deletions
+109
-188
lib/backup/manager.rb
lib/backup/manager.rb
+39
-39
spec/lib/gitlab/backup/manager_spec.rb
spec/lib/gitlab/backup/manager_spec.rb
+0
-4
spec/tasks/gitlab/backup_rake_spec.rb
spec/tasks/gitlab/backup_rake_spec.rb
+70
-145
No files found.
lib/backup/manager.rb
View file @
567baf0e
...
...
@@ -101,8 +101,7 @@ module Backup
end
def
unpack
Dir
.
chdir
(
backup_path
)
Dir
.
chdir
(
backup_path
)
do
# check for existing backups in the backup dir
if
backup_file_list
.
empty?
$progress
.
puts
"No backups found in
#{
backup_path
}
"
...
...
@@ -147,6 +146,7 @@ module Backup
exit
1
end
end
end
def
tar_version
tar_version
,
_
=
Gitlab
::
Popen
.
popen
(
%w(tar --version)
)
...
...
spec/lib/gitlab/backup/manager_spec.rb
View file @
567baf0e
...
...
@@ -172,10 +172,6 @@ describe Backup::Manager do
end
describe
'#unpack'
do
before
do
allow
(
Dir
).
to
receive
(
:chdir
)
end
context
'when there are no backup files in the directory'
do
before
do
allow
(
Dir
).
to
receive
(
:glob
).
and_return
([])
...
...
spec/tasks/gitlab/backup_rake_spec.rb
View file @
567baf0e
This diff is collapsed.
Click to expand it.
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