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

Inherits:
SAML show all
Defined in:
lib/gitlab/qa/scenario/test/integration/group_saml.rb

Instance Attribute Summary

Attributes inherited from SAML

#gitlab_name, #spec_suite

Instance Method Summary collapse

Methods inherited from SAML

#perform

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

perform, #perform

Constructor Details

#initializeGroupSAML

Returns a new instance of GroupSAML.



9
10
11
12
# File 'lib/gitlab/qa/scenario/test/integration/group_saml.rb', line 9

def initialize
  @gitlab_name = 'gitlab-group-saml'
  @spec_suite = 'QA::EE::Scenario::Test::Integration::GroupSAML'
end

Instance Method Details

#before_perform(release) ⇒ Object

Raises:

  • (ArgumentError)


14
15
16
# File 'lib/gitlab/qa/scenario/test/integration/group_saml.rb', line 14

def before_perform(release)
  raise ArgumentError, 'Group SAML is EE only feature!' unless release.ee?
end

#configure(gitlab, saml) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/gitlab/qa/scenario/test/integration/group_saml.rb', line 18

def configure(gitlab, saml)
  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
end