Commit 33795327 authored by Stan Hu's avatar Stan Hu

Clean the test path after each spec run

FactoryBot's build_stubbed ignores the current database sequence of the
projects table and starts at ID 1000. If more than 1000 projects are created
during a test run, leftover repositories can cause spec failures. For example,
a spec that expects an empty repository may fail since there may be existing
content.

Closes #5461
parent e46cd8b5
......@@ -111,6 +111,10 @@ RSpec.configure do |config|
end
# EE-specific stop
config.after(:all) do
TestEnv.clean_test_path
end
config.before(:example) do
# Skip pre-receive hook check so we can use the web editor and merge.
allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([true, nil])
......
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