Remove entire test files directory for test builds
This commit is contained in:
parent
d917ac0f86
commit
01f588edbc
1 changed files with 6 additions and 8 deletions
|
@ -3,17 +3,15 @@ RSpec.configure do |config|
|
|||
Rails.root.join('tmp/tests/builds')
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
FileUtils.mkdir_p(builds_path)
|
||||
FileUtils.touch(File.join(builds_path, ".gitkeep"))
|
||||
config.before(:suite) do
|
||||
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)
|
||||
config.before(:each) do
|
||||
FileUtils.mkdir_p(builds_path)
|
||||
end
|
||||
|
||||
config.after(:each) do
|
||||
FileUtils.rm_rf(builds_path)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue