Skip to content

Update and unquarantine cross_referenced_spec.rb

Nao Hashizume requested to merge 368827-unquarantine-spec into master

What does this MR do and why?

This MR updates a spec/lib/gitlab/github_import/importer/events/cross_referenced_spec.rb and unquarantine the spec. Closes #368827 (closed)

Note that the spec failure is not reproducible when running spec/lib/gitlab/github_import/importer/events/cross_referenced_spec.rb alone, since issue.iid and referenced_in.iid can be same, and it was maybe giving a false positive.

However, we can see that the spec failed since issue.iid and referenced_in.iid are now different when running this spec with other specs (e.g. ./spec/helpers/merge_requests_helper_spec.rb) which interact with DB.

I think we should use referenced_in.iid instead issue.iid in expected_note_body since we are checking the issue is mentioned by another issue (in this case referenced_in issue), instead of the issue is mentioned by its own issue.

-    let(:expected_note_body) { "mentioned in issue ##{issue.iid}" }
+    let(:expected_note_body) { "mentioned in issue ##{referenced_in.iid}" }

How to set up and validate locally

Run the below command locally

bundle exec rspec './spec/helpers/merge_requests_helper_spec.rb[1:4:3:2]' './spec/lib/gitlab/github_import/importer/events/cross_referenced_spec.rb[1:1:1]' -r spec_helper;

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #368827 (closed)

Edited by Nao Hashizume

Merge request reports

Loading