Skip to content

Use ::CloudConnector::AccessService interface in X-Ray tests

What does this MR do and why?

Use ::CloudConnector::AccessService abstraction in X-Ray specs.
Hide internal details behind receiving Cloud Connector access tokens.
This allows a more flexible test design.

The diff may look bloated, but it's mostly because I added context 'when cloud connector access token is valid' do in two places to group up the setup (without token/with token).

Also, I didn't refactor similar specs in:

  • context 'when before the service start date' do
  • and context 'when it is past the code suggestions service start date' do

...because the former should be deleted entirely after 15.02.2024, so it does not seem practical to introduce shared_examples now.

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

no-op: only refactors tests. We rely on CI here.

Related to #440569 (closed)

Edited by Aleksei Lipniagov

Merge request reports