Sha256: 4a3e4a7c23fc4f8c6a4a7c89c6f2925cd7c3df5f65587c67ff00d00e633b931e

Contents?: true

Size: 1.43 KB

Versions: 44

Compression:

Stored size: 1.43 KB

Contents

# frozen_string_literal: true

module Gitlab
  module QA
    module Scenario
      module Test
        module Instance
          ##
          # Base class to be used to define deployment environment scenarios
          #
          class DeploymentBase < Scenario::Template
            def initialize
              @suite = 'Test::Instance::All'
            end

            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

            def non_rspec_args
              [deployment_component::ADDRESS]
            end

            def deployment_component
              raise NotImplementedError,
                'Please define the Component for the deployment environment associated with this scenario.'
            end
          end
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
gitlab-qa-15.3.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-15.2.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-15.1.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-15.0.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.21.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.20.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.19.2 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.19.1 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.19.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.18.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.17.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.16.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.15.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.14.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.13.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.12.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.11.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.9.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.8.1 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-14.8.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb