class Gitlab::QA::Scenario::Test::Integration::ClientSSL

Public Class Methods

new() click to toggle source
# File lib/gitlab/qa/scenario/test/integration/client_ssl.rb, line 7
def initialize
  @gitlab_name = 'gitlab'
  @spec_suite = 'Test::Instance::All'
  @network = 'test'
  @env = {}
  @tag = 'client_ssl'
end

Public Instance Methods

gitlab_omnibus() click to toggle source

rubocop:enable Metrics/AbcSize

# File lib/gitlab/qa/scenario/test/integration/client_ssl.rb, line 47
            def gitlab_omnibus
              <<~OMNIBUS
                external_url 'https://#{@gitlab_name}.#{@network}';
                letsencrypt['enable'] = false;

                nginx['ssl_certificate'] = '/etc/gitlab/ssl/gitlab.test.crt';
                nginx['ssl_certificate_key'] = '/etc/gitlab/ssl/gitlab.test.key';

                nginx['ssl_verify_client'] = 'on';
                nginx['ssl_client_certificate'] = '/etc/gitlab/authority/ca.pem';
                nginx['ssl_verify_depth'] = '2';
              OMNIBUS
            end
perform(release, *rspec_args) click to toggle source

rubocop:disable Metrics/AbcSize

# File lib/gitlab/qa/scenario/test/integration/client_ssl.rb, line 16
def perform(release, *rspec_args)
  Component::Gitlab.perform do |gitlab|
    gitlab.release = QA::Release.new(release)
    gitlab.name = @gitlab_name
    gitlab.network = @network
    gitlab.skip_availability_check = true

    gitlab.omnibus_configuration << gitlab_omnibus

    gitlab.tls = true

    gitlab.instance do
      puts 'Running Client SSL specs!'

      if @tag
        rspec_args << "--" unless rspec_args.include?('--')
        rspec_args << "--tag" << @tag
      end

      Component::Specs.perform do |specs|
        specs.suite = @spec_suite
        specs.release = gitlab.release
        specs.network = gitlab.network
        specs.args = [gitlab.address, *rspec_args]
        specs.env = @env
      end
    end
  end
end