Skip to content

Set project path to fix the random flakiness of the tests

What does this MR do and why?

There're cases when the another_project is created before project and since we're using sequence(:path) { |n| "project-#{n}" } to set the project's path, another_project may have the path that has a lower number than project. This breaks the tests that rely on the sorting order.

In order to make sure that the expected order is in place, let's manually set the path for another_project and project.

The MR should fix the issue [Test] spec/models/packages/package_spec.rb | P... (#451854 - closed) and [Test] spec/models/packages/package_spec.rb | P... (#451855 - closed)

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.

How to set up and validate locally

We can check that the tests are passing.

bundle exec rspec spec/models/packages/package_spec.rb:121

Related to #451854 (closed)

Edited by Dzmitry Meshcharakou

Merge request reports