summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-23 11:52:38 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-23 11:52:38 +0100
commit01f588edbcf1f0f0453cae1677c9372c76e25775 (patch)
tree0f66c31f7472e0c1f748da37ad9609a87d3fc28b
parentd917ac0f864a25265407947f334c4f8ee2f5a768 (diff)
downloadgitlab-ce-01f588edbcf1f0f0453cae1677c9372c76e25775.tar.gz
Remove entire test files directory for test builds
-rw-r--r--spec/support/setup_builds_storage.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/support/setup_builds_storage.rb b/spec/support/setup_builds_storage.rb
index a0a7120ceb5..fd729434898 100644
--- a/spec/support/setup_builds_storage.rb
+++ b/spec/support/setup_builds_storage.rb
@@ -3,17 +3,15 @@ RSpec.configure do |config|
Rails.root.join('tmp/tests/builds')
end
+ config.before(:suite) do
+ Settings.gitlab_ci['builds_path'] = builds_path
+ 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
config.after(:each) do
- Dir[File.join(builds_path, '*')].each do |path|
- next if File.basename(path) == '.gitkeep'
-
- FileUtils.rm_rf(path)
- end
+ FileUtils.rm_rf(builds_path)
end
end