E2E test: refuse code generation request directly to AI gateway
What does this MR do and why?
Adds an E2E API test to ensure that code generations is refused when requesting it directly from AI-gateway.
Resolves gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#617 (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.
Results
ai-gateway
job from this MR (Self Managed instance using ai-gateway in mock mode)
- https://gitlab.com/gitlab-org/gitlab/-/jobs/7807639926#L442
- https://gitlab.com/gitlab-org/gitlab/-/jobs/7784253764#L526
Against staging:
- https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/15334502#L114 (this job uses the gitlab-qa build image from this MR and is used against staging)
How to set up and validate locally
(Against a GDK with code suggestions set-up)
QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=https://gdk.test:3443 bundle exec rspec qa/specs/features/ee/api/3_create/code_suggestions_spec.rb --tag "~orchestrated"
(Against staging)
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
Edited by Jay McCure