diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index 6c48d6254d32043d2cbc1116d7a6448572a53432..5bc715ea30289370351d931eb4c0f662145e99f3 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -598,6 +598,19 @@ ai-gateway-no-seat-assigned: - if: $QA_SUITES =~ /Test::Integration::AiGatewayNoSeatAssigned/ - !reference [.rules:test:manual, rules] +ai-gateway-no-add-on: + extends: + - .ai-gateway-base + variables: + QA_SCENARIO: Test::Integration::AiGatewayNoAddOn + before_script: + - export QA_EE_ACTIVATION_CODE=$QA_EE_ACTIVATION_CODE_NO_ADD_ON + - !reference [.ai-gateway-base, before_script] + rules: + - !reference [.rules:test:qa, rules] + - if: $QA_SUITES =~ /Test::Integration::AiGatewayNoAddOn/ + - !reference [.rules:test:manual, rules] + ai-gateway-no-license: extends: - .ai-gateway-base diff --git a/qa/qa/ee/scenario/test/integration/ai_gateway_no_add_on.rb b/qa/qa/ee/scenario/test/integration/ai_gateway_no_add_on.rb new file mode 100644 index 0000000000000000000000000000000000000000..8c67b7d6ce5e62585de8ef874629880fbe98b1f6 --- /dev/null +++ b/qa/qa/ee/scenario/test/integration/ai_gateway_no_add_on.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module QA + module EE + module Scenario + module Test + module Integration + class AiGatewayNoAddOn < QA::Scenario::Test::Instance::All + tags :ai_gateway_no_add_on + end + end + end + end + end +end diff --git a/qa/qa/specs/features/ee/api/3_create/code_suggestions_spec.rb b/qa/qa/specs/features/ee/api/3_create/code_suggestions_spec.rb index 9c515de018133c5dddc4ca8369fd171670b99285..6d40ce930d5e8addf989117fadcad7dddae2ac6e 100644 --- a/qa/qa/specs/features/ee/api/3_create/code_suggestions_spec.rb +++ b/qa/qa/specs/features/ee/api/3_create/code_suggestions_spec.rb @@ -93,6 +93,10 @@ module QA it_behaves_like 'unauthorized', 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/451487' end end + + context 'with no Duo Pro add-on', :ai_gateway_no_add_on do + it_behaves_like 'unauthorized', 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/452448' + end end context 'with no license', :ai_gateway_no_license do diff --git a/qa/qa/specs/features/ee/browser_ui/3_create/web_ide/code_suggestions_in_web_ide_spec.rb b/qa/qa/specs/features/ee/browser_ui/3_create/web_ide/code_suggestions_in_web_ide_spec.rb index ae79df6eb2a7e959ceb72f746afa6f508030b2e1..a99e7b64eaad99529a3e92a1b4e403979fdca899 100644 --- a/qa/qa/specs/features/ee/browser_ui/3_create/web_ide/code_suggestions_in_web_ide_spec.rb +++ b/qa/qa/specs/features/ee/browser_ui/3_create/web_ide/code_suggestions_in_web_ide_spec.rb @@ -94,6 +94,10 @@ module QA it_behaves_like 'unauthorized', 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/451486' end end + + context 'with no Duo Pro add-on', :ai_gateway_no_add_on do + it_behaves_like 'unauthorized', 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/452450' + end end context 'with no license', :ai_gateway_no_license do