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
8c4e1c7e
Commit
8c4e1c7e
authored
Feb 28, 2020
by
Henrik Christian Grove
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce code duplication
parent
2bdb7da5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
spec/tasks/gitlab/backup_rake_spec.rb
spec/tasks/gitlab/backup_rake_spec.rb
+12
-14
No files found.
spec/tasks/gitlab/backup_rake_spec.rb
View file @
8c4e1c7e
...
...
@@ -14,6 +14,14 @@ describe 'gitlab:app namespace rake task' do
tars_glob
.
first
end
def
backup_files
%w(backup_information.yml artifacts.tar.gz builds.tar.gz lfs.tar.gz pages.tar.gz)
end
def
backup_directories
%w(db repositories)
end
before
(
:all
)
do
Rake
.
application
.
rake_require
'tasks/gitlab/helpers'
Rake
.
application
.
rake_require
'tasks/gitlab/backup'
...
...
@@ -28,26 +36,16 @@ describe 'gitlab:app namespace rake task' do
before
do
stub_env
(
'force'
,
'yes'
)
FileUtils
.
rm
(
tars_glob
,
force:
true
)
FileUtils
.
rm
(
'backup_information.yml'
,
force:
true
)
FileUtils
.
rm
(
'artifacts.tar.gz'
,
force:
true
)
FileUtils
.
rm
(
'builds.tar.gz'
,
force:
true
)
FileUtils
.
rm
(
'lfs.tar.gz'
,
force:
true
)
FileUtils
.
rm
(
'pages.tar.gz'
,
force:
true
)
FileUtils
.
rm_rf
(
'db'
,
secure:
true
)
FileUtils
.
rm_rf
(
'repositories'
,
secure:
true
)
FileUtils
.
rm
(
backup_files
,
force:
true
)
FileUtils
.
rm_rf
(
backup_directories
,
secure:
true
)
reenable_backup_sub_tasks
stub_container_registry_config
(
enabled:
enable_registry
)
end
after
do
FileUtils
.
rm
(
tars_glob
,
force:
true
)
FileUtils
.
rm
(
'backup_information.yml'
,
force:
true
)
FileUtils
.
rm
(
'artifacts.tar.gz'
,
force:
true
)
FileUtils
.
rm
(
'builds.tar.gz'
,
force:
true
)
FileUtils
.
rm
(
'lfs.tar.gz'
,
force:
true
)
FileUtils
.
rm
(
'pages.tar.gz'
,
force:
true
)
FileUtils
.
rm_rf
(
'db'
,
secure:
true
)
FileUtils
.
rm_rf
(
'repositories'
,
secure:
true
)
FileUtils
.
rm
(
backup_files
,
force:
true
)
FileUtils
.
rm_rf
(
backup_directories
,
secure:
true
)
end
def
run_rake_task
(
task_name
)
...
...
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