E2E test: Use Support::API in code_suggestions_spec explicitly
What does this MR do and why?
Previously the code suggestions e2e spec would fail with 401s when run as a smoke test only.
Resolves #431317 (closed) Reason for this change: #431317 (comment 2064783534)
- Explicitly use
Support::APIin code suggestion spec, as it would sometimes use a differentpostmethod (e.g.airborne) (similar to !96991 (merged) ) - Removes debugging
- Better error message for when code suggestion is nil, as seen in https://gitlab.com/gitlab-org/gitlab/-/issues/479923
How to set up and validate locally
I have run the gitlab-qa build image against staging here: https://ops.gitlab.net/gitlab-org/quality/staging/-/pipelines/3624397
Code suggestion tests passed first go: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/15084248#L187
QA_LOG_LEVEL=debug GITLAB_QA_USER_AGENT=1p GITLAB_USERNAME=gitlab-qa GITLAB_PASSWORD=1p GITLAB_QA_ACCESS_TOKEN=1p QA_GITLAB_URL=https://staging.gitlab.com bundle exec rspec qa/specs/features/ee/api/3_create/code_suggestions_spec.rb --tag smoke --tag "~geo" --tag "~orchestrated" --tag "~skip_signup_disabled" --tag "~skip_live_env" --seed 35498
Edited by Jay McCure