Class: Gitlab::QA::Scenario::Test::Integration::GroupSAML

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

Instance Method Summary collapse

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

perform

Instance Method Details

#perform(release) ⇒ Object

rubocop:disable Metrics/AbcSize

Raises:

  • (ArgumentError)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/gitlab/qa/scenario/test/integration/group_saml.rb', line 10

def perform(release)
  release = Release.new(release)

  raise ArgumentError, 'Group SAML is EE only feature!' unless release.ee?

  Component::Gitlab.perform do |gitlab|
    gitlab.release = release.edition
    gitlab.name = 'gitlab-saml'
    gitlab.network = 'test'

    Component::SAML.perform do |saml|
      saml.network = 'test'
      saml.set_entity_id("#{gitlab.address}/groups/#{saml.group_name}")
      saml.set_assertion_consumer_service("#{gitlab.address}/groups/#{saml.group_name}/-/saml/callback")
      saml.set_sandbox_name(saml.group_name)
      saml.set_simple_saml_hostname
      saml.set_accept_insecure_certs

      gitlab.omnibus_config = <<~OMNIBUS
        gitlab_rails['omniauth_enabled'] = true;
        gitlab_rails['omniauth_providers'] = [{ name: 'group_saml' }];
      OMNIBUS

      saml.instance do
        gitlab.instance do
          puts 'Running SAML specs!'

          Component::Specs.perform do |specs|
            specs.suite = 'QA::EE::Scenario::Test::Integration::GroupSAML'
            specs.release = release
            specs.network = gitlab.network
            specs.args = [gitlab.address]
          end
        end
      end
    end
  end
end