Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-07-24 19:54:06 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-07-24 19:54:06 +0300
commit39a7e210a3484fb84683d53c2cf5e0f7ef0c3a80 (patch)
tree467f56cc7b88952be783765603a7686a940c9cb7 /spec/tasks
parentdb0fce322a19e20e755abca772ceb2918d815ea0 (diff)
Use a separate backup test directory and nuke its contents
Diffstat (limited to 'spec/tasks')
-rw-r--r--spec/tasks/gitlab/backup_rake_spec.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb
index 48d08031d29..23f322e0a62 100644
--- a/spec/tasks/gitlab/backup_rake_spec.rb
+++ b/spec/tasks/gitlab/backup_rake_spec.rb
@@ -67,8 +67,7 @@ describe 'gitlab:app namespace rake task' do
end
def create_backup
- # Record the existing backup tars so we don't touch them
- existing_tars = tars_glob
+ FileUtils.rm tars_glob
# Redirect STDOUT and run the rake task
orig_stdout = $stdout
@@ -78,7 +77,7 @@ describe 'gitlab:app namespace rake task' do
reenable_backup_sub_tasks
$stdout = orig_stdout
- @backup_tar = (tars_glob - existing_tars).first
+ @backup_tar = tars_glob.first
end
before do
@@ -140,8 +139,7 @@ describe 'gitlab:app namespace rake task' do
reenable_backup_sub_tasks
- # Record the existing backup tars so we don't touch them
- existing_tars = tars_glob
+ FileUtils.rm tars_glob
# Redirect STDOUT and run the rake task
orig_stdout = $stdout
@@ -150,7 +148,7 @@ describe 'gitlab:app namespace rake task' do
run_rake_task('gitlab:backup:create')
$stdout = orig_stdout
- @backup_tar = (tars_glob - existing_tars).first
+ @backup_tar = tars_glob.first
end
after :all do