Skip to content

E2E test: refuse code generation request directly to AI gateway

Jay McCure requested to merge jm-cs-gen-deny-direct into master

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)

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

Merge request reports

Loading