Commit 60cb71be authored by Stan Hu's avatar Stan Hu

Fix flaky test in releases_controller_spec.rb

Multiple release objects would be created in the test with the same tag
(v1.1.0), which caused random failures, depending on what the database
returned for Releases.find_by_tag!. Since there is no uniqueness
constraint, we fix this problem by changing the tag to a unique name.

Closes https://gitlab.com/gitlab-org/gitlab/issues/37372
parent d53dbd77
...@@ -167,7 +167,8 @@ describe Projects::ReleasesController do ...@@ -167,7 +167,8 @@ describe Projects::ReleasesController do
end end
describe 'GET #evidence' do describe 'GET #evidence' do
let!(:release) { create(:release, :with_evidence, project: project) } let(:tag_name) { "v1.1.0-evidence" }
let!(:release) { create(:release, :with_evidence, project: project, tag: tag_name) }
let(:tag) { CGI.escape(release.tag) } let(:tag) { CGI.escape(release.tag) }
let(:format) { :json } let(:format) { :json }
......
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