Skip to content
Snippets Groups Projects
Commit d7dc9ad1 authored by Stan Hu's avatar Stan Hu Committed by Toon Claes
Browse files

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 092445a4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -97,6 +97,10 @@ RSpec.configure do |config|
TestEnv.init
end
 
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])
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment