diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-23 09:36:45 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-23 09:36:45 +0100 |
commit | 78529bbd19252beba7e747f047894033bdc84100 (patch) | |
tree | bcd9994f3b5de12af7c59c44f3291b140a9d4be4 | |
parent | 0676c5c7140ccf5b809eddab79b6fb78b7db0a66 (diff) | |
download | gitlab-ce-78529bbd19252beba7e747f047894033bdc84100.tar.gz |
Clean build storage after each RSpec test example
This prevents subsequent test examples to be affected by previous tests
that were executed.
-rw-r--r-- | spec/support/setup_builds_storage.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/setup_builds_storage.rb b/spec/support/setup_builds_storage.rb index a4f21e95338..a0a7120ceb5 100644 --- a/spec/support/setup_builds_storage.rb +++ b/spec/support/setup_builds_storage.rb @@ -1,6 +1,6 @@ RSpec.configure do |config| def builds_path - Rails.root.join('tmp/builds') + Rails.root.join('tmp/tests/builds') end config.before(:each) do @@ -9,7 +9,7 @@ RSpec.configure do |config| Settings.gitlab_ci['builds_path'] = builds_path end - config.after(:suite) do + config.after(:each) do Dir[File.join(builds_path, '*')].each do |path| next if File.basename(path) == '.gitkeep' |