class Gitlab::QA::Scenario::Test::Instance::DeploymentBase

Base class to be used to define deployment environment scenarios

Public Class Methods

new() click to toggle source
# File lib/gitlab/qa/scenario/test/instance/deployment_base.rb, line 10
def initialize
  @suite = 'Test::Instance::All'
end

Public Instance Methods

deployment_component() click to toggle source
# File lib/gitlab/qa/scenario/test/instance/deployment_base.rb, line 37
def deployment_component
  raise NotImplementedError, 'Please define the Component for the deployment environment associated with this scenario.'
end
non_rspec_args() click to toggle source
# File lib/gitlab/qa/scenario/test/instance/deployment_base.rb, line 33
def non_rspec_args
  [deployment_component::ADDRESS]
end
perform(release_name = nil, *args) click to toggle source
# File lib/gitlab/qa/scenario/test/instance/deployment_base.rb, line 14
def perform(release_name = nil, *args)
  # EE_LICENSE variable should be unset otherwise the existing license may be accidentially replaced
  Runtime::Env.require_no_license!

  release = if release_name.nil? || release_name.start_with?('--')
              deployment_component.release
            else
              QA::Release.new(release_name)
            end

  args.unshift(release_name) if release_name&.start_with?('--')

  Component::Specs.perform do |specs|
    specs.suite = @suite
    specs.release = release
    specs.args = non_rspec_args.push(*args)
  end
end