Class: Gitlab::QA::Scenario::Test::Integration::AiGateway

Inherits:
Gitlab::QA::Scenario::Template show all
Defined in:
lib/gitlab/qa/scenario/test/integration/ai_gateway.rb

Constant Summary collapse

SETUP_SRC_PATH =
File.expand_path('../../../../../../support/setup', __dir__)
SETUP_DEST_PATH =
'/tmp/setup-scripts'

Instance Method Summary collapse

Methods inherited from Gitlab::QA::Scenario::Template

perform

Constructor Details

#initializeAiGateway

Returns a new instance of AiGateway.



12
13
14
15
16
17
# File 'lib/gitlab/qa/scenario/test/integration/ai_gateway.rb', line 12

def initialize
  @network = 'test'
  @ai_gateway_name = 'ai-gateway'
  @ai_gateway_hostname = "#{@ai_gateway_name}.#{@network}"
  @ai_gateway_port = 5000
end

Instance Method Details

#perform(release, *rspec_args) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/gitlab/qa/scenario/test/integration/ai_gateway.rb', line 19

def perform(release, *rspec_args)
  Component::Gitlab.perform do |gitlab|
    setup_gitlab(gitlab, release)

    Component::AiGateway.perform do |ai_gateway|
      setup_ai_gateway(ai_gateway, gitlab_hostname: gitlab.hostname)

      ai_gateway.instance do
        gitlab.instance do
          setup_code_suggestions(gitlab)
          run_specs(gitlab, *rspec_args)
        end
      end
    end
  end
end