diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-16 00:00:08 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-16 00:06:41 +0200 |
commit | 2f2b9f67c21a504826595079e103f1ea9ac813f2 (patch) | |
tree | ab5b5562873196b3c6f384c11c0d86c714a7708c | |
parent | 416d98b497db6e8c8ad46072e17e835da27f23c7 (diff) | |
download | gitlab-ce-2f2b9f67c21a504826595079e103f1ea9ac813f2.tar.gz |
Fix backup tests
-rw-r--r-- | lib/backup/manager.rb | 2 | ||||
-rw-r--r-- | spec/support/setup_builds_storage.rb | 3 | ||||
-rw-r--r-- | spec/tasks/gitlab/backup_rake_spec.rb | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index 13c68d9354f..ac63f89c6ec 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -153,7 +153,7 @@ module Backup end def folders_to_backup - folders = %w{repositories db uploads} + folders = %w{repositories db uploads builds} if ENV["SKIP"] return folders.reject{ |folder| ENV["SKIP"].include?(folder) } diff --git a/spec/support/setup_builds_storage.rb b/spec/support/setup_builds_storage.rb index 1f3b12bb8d2..a3e59646187 100644 --- a/spec/support/setup_builds_storage.rb +++ b/spec/support/setup_builds_storage.rb @@ -1,10 +1,11 @@ RSpec.configure do |config| def builds_path - Rails.root.join('tmp/builds_test') + Rails.root.join('tmp/builds') end config.before(:each) do FileUtils.mkdir_p(builds_path) + FileUtils.touch(File.join(builds_path, ".gitkeep")) Settings.gitlab_ci['builds_path'] = builds_path end diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb index 36e425bb490..2e63e5f36af 100644 --- a/spec/tasks/gitlab/backup_rake_spec.rb +++ b/spec/tasks/gitlab/backup_rake_spec.rb @@ -16,7 +16,7 @@ describe 'gitlab:app namespace rake task' do end def reenable_backup_sub_tasks - %w{db repo uploads}.each do |subtask| + %w{db repo uploads builds}.each do |subtask| Rake::Task["gitlab:backup:#{subtask}:create"].reenable end end @@ -160,7 +160,7 @@ describe 'gitlab:app namespace rake task' do it "does not contain skipped item" do tar_contents, exit_status = Gitlab::Popen.popen( - %W{tar -tvf #{@backup_tar} db uploads repositories} + %W{tar -tvf #{@backup_tar} db uploads repositories builds} ) expect(tar_contents).to match('db/') |