diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-19 10:00:58 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-19 10:00:58 +0000 |
commit | 5b30285407a050600c35145632d6901e81d94355 (patch) | |
tree | 79c72885cea50e329caf7368a69a5e7551a16f2e /spec | |
parent | caf1c9d85bb9df05b8e7f90e1a844fe8ecb5a857 (diff) | |
parent | bf3c0aafaa17c2e322d225180fd9708ec2827ac4 (diff) | |
download | gitlab-ce-5b30285407a050600c35145632d6901e81d94355.tar.gz |
Merge branch 'check_if_it_should_be_archived_in_backup' into 'master'
Check which folders and archives should be packed before passing to tar command.
If user uses backup task with SKIP and skips one of the archives listed(uploads, builds, artifacts) backup create will give an error: `Cannot stat: No such file or directory`.
This MR fixes that by checking for skipped items.
Additionally, compact everything to avoid `TypeError: no implicit conversion of nil into String` errors.
See merge request !1824
Diffstat (limited to 'spec')
-rw-r--r-- | spec/tasks/gitlab/backup_rake_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb index 06559c3925d..fb5e74af648 100644 --- a/spec/tasks/gitlab/backup_rake_spec.rb +++ b/spec/tasks/gitlab/backup_rake_spec.rb @@ -149,7 +149,7 @@ describe 'gitlab:app namespace rake task' do # Redirect STDOUT and run the rake task orig_stdout = $stdout $stdout = StringIO.new - ENV["SKIP"] = "repositories" + ENV["SKIP"] = "repositories,uploads" run_rake_task('gitlab:backup:create') $stdout = orig_stdout @@ -180,6 +180,7 @@ describe 'gitlab:app namespace rake task' do expect(Rake::Task["gitlab:backup:db:restore"]).to receive :invoke expect(Rake::Task["gitlab:backup:repo:restore"]).not_to receive :invoke + expect(Rake::Task["gitlab:backup:uploads:restore"]).not_to receive :invoke expect(Rake::Task["gitlab:backup:builds:restore"]).to receive :invoke expect(Rake::Task["gitlab:backup:artifacts:restore"]).to receive :invoke expect(Rake::Task["gitlab:shell:setup"]).to receive :invoke |