Commit 78529bbd authored by Grzegorz Bizon's avatar Grzegorz Bizon

Clean build storage after each RSpec test example

This prevents subsequent test examples to be affected by previous tests
that were executed.
parent 0676c5c7
RSpec.configure do |config| RSpec.configure do |config|
def builds_path def builds_path
Rails.root.join('tmp/builds') Rails.root.join('tmp/tests/builds')
end end
config.before(:each) do config.before(:each) do
...@@ -9,7 +9,7 @@ RSpec.configure do |config| ...@@ -9,7 +9,7 @@ RSpec.configure do |config|
Settings.gitlab_ci['builds_path'] = builds_path Settings.gitlab_ci['builds_path'] = builds_path
end end
config.after(:suite) do config.after(:each) do
Dir[File.join(builds_path, '*')].each do |path| Dir[File.join(builds_path, '*')].each do |path|
next if File.basename(path) == '.gitkeep' next if File.basename(path) == '.gitkeep'
......
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