Fix backup tests

This commit is contained in:
Kamil Trzcinski 2015-09-16 00:00:08 +02:00
parent 416d98b497
commit 2f2b9f67c2
3 changed files with 5 additions and 4 deletions

View file

@ -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) }

View file

@ -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

View file

@ -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/')