Stub registry API check in EE projects destroy service spec

What does this MR do and why?

ee/spec/services/projects/destroy_service_spec.rb averages 5.17 min in CI. Almost every example spent about 5s in ContainerRegistry::GitlabApiClient#supports_gitlab_api?, which retried a refused connection to the test registry on localhost:5000 and then returned false.

This MR stubs that check to false with stub_gitlab_api_client_to_support_gitlab_api(supported: false), as spec/services/projects/destroy_service_spec.rb does. The examples get the same false as before, without the wait. The spec stays one file: with the stub, a split is not necessary (see !271431 (comment 4330011709)).

Related to #640415

Edited by Fabio Pitino

Merge request reports

Loading
Loading