Commit 2f2b9f67 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix backup tests

parent 416d98b4
...@@ -153,7 +153,7 @@ module Backup ...@@ -153,7 +153,7 @@ module Backup
end end
def folders_to_backup def folders_to_backup
folders = %w{repositories db uploads} folders = %w{repositories db uploads builds}
if ENV["SKIP"] if ENV["SKIP"]
return folders.reject{ |folder| ENV["SKIP"].include?(folder) } return folders.reject{ |folder| ENV["SKIP"].include?(folder) }
......
RSpec.configure do |config| RSpec.configure do |config|
def builds_path def builds_path
Rails.root.join('tmp/builds_test') Rails.root.join('tmp/builds')
end end
config.before(:each) do config.before(:each) do
FileUtils.mkdir_p(builds_path) FileUtils.mkdir_p(builds_path)
FileUtils.touch(File.join(builds_path, ".gitkeep"))
Settings.gitlab_ci['builds_path'] = builds_path Settings.gitlab_ci['builds_path'] = builds_path
end end
......
...@@ -16,7 +16,7 @@ describe 'gitlab:app namespace rake task' do ...@@ -16,7 +16,7 @@ describe 'gitlab:app namespace rake task' do
end end
def reenable_backup_sub_tasks 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 Rake::Task["gitlab:backup:#{subtask}:create"].reenable
end end
end end
...@@ -160,7 +160,7 @@ describe 'gitlab:app namespace rake task' do ...@@ -160,7 +160,7 @@ describe 'gitlab:app namespace rake task' do
it "does not contain skipped item" do it "does not contain skipped item" do
tar_contents, exit_status = Gitlab::Popen.popen( 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/') expect(tar_contents).to match('db/')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment