Commit 30782d97 authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'jprovazn-testfix2' into 'master'

Clean test path between merge request handler tests

Closes #40900

See merge request gitlab-org/gitlab-ce!15792
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
stub_config_setting(host: 'localhost') stub_config_setting(host: 'localhost')
end end
after do
TestEnv.clean_test_path
end
let(:email_raw) { fixture_file('emails/valid_new_merge_request.eml') } let(:email_raw) { fixture_file('emails/valid_new_merge_request.eml') }
let(:namespace) { create(:namespace, path: 'gitlabhq') } let(:namespace) { create(:namespace, path: 'gitlabhq') }
...@@ -13,11 +17,7 @@ ...@@ -13,11 +17,7 @@
let(:email_raw) { fixture_file('emails/valid_new_merge_request.eml') } let(:email_raw) { fixture_file('emails/valid_new_merge_request.eml') }
let(:namespace) { create(:namespace, path: 'gitlabhq') } let(:namespace) { create(:namespace, path: 'gitlabhq') }
# project's git repository is not deleted when project is deleted let!(:project) { create(:project, :public, :repository, namespace: namespace, path: 'gitlabhq') }
# between tests. Then tests fail because re-creation of the project with
# the same name fails on existing git repository -> skip_disk_validation
# ignores repository existence on disk
let!(:project) { create(:project, :public, :repository, skip_disk_validation: true, namespace: namespace, path: 'gitlabhq') }
let!(:user) do let!(:user) do
create( create(
:user, :user,
......
Supports Markdown
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