Skip to content

Master broken 6617 fix flaky vulnerability finder presenter

What does this MR do and why?

Fixes flaky test.

1) Vulnerabilities::FindingPresenter#blob_path without a sha is expected to be blank
     Failure/Error: it { is_expected.to be_blank }
       expected `"/namespace1/project-1/-/blob/master/a.txt#L1-2".blank?` to be truthy, got false
     # ./ee/spec/presenters/vulnerabilities/finding_presenter_spec.rb:50:in `block (4 levels) in <main>'
     # ./spec/spec_helper.rb:448:in `block (3 levels) in <top (required)>'
     # ./lib/gitlab/sidekiq_sharding/validator.rb:42:in `enabled'
     # ./spec/spec_helper.rb:447:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:442:in `block (3 levels) in <top (required)>'
     # ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
     # ./spec/spec_helper.rb:433:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:429:in `block (3 levels) in <top (required)>'
     # ./lib/gitlab/application_context.rb:70:in `with_raw_context'
     # ./spec/spec_helper.rb:429:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:261:in `block (2 levels) in <top (required)>'
     # ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
     # ./spec/support/fast_quarantine.rb:22:in `block (2 levels) in <main>'
     # ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <main>'
     # ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
     # ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <main>'

Finished in 57.58 seconds (files took 56.72 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./ee/spec/presenters/vulnerabilities/finding_presenter_spec.rb:50 # Vulnerabilities::FindingPresenter#blob_path without a sha is expected to be blank

See: gitlab-org/quality/engineering-productivity/master-broken-incidents#6617 (comment 1924134495)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Bala Kumar

Merge request reports

Loading