Class: Gitlab::QA::Scenario::Test::Integration::LDAP

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

Direct Known Subclasses

LDAPNoTLS, LDAPTLS

Instance Attribute Summary collapse

Instance Method Summary collapse

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

perform

Instance Attribute Details

#gitlab_nameObject (readonly)

Returns the value of attribute gitlab_name.



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

def gitlab_name
  @gitlab_name
end

#spec_suiteObject (readonly)

Returns the value of attribute spec_suite.



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

def spec_suite
  @spec_suite
end

#tlsObject (readonly)

Returns the value of attribute tls.



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

def tls
  @tls
end

Instance Method Details

#configure(gitlab, ldap) ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/gitlab/qa/scenario/test/integration/ldap.rb', line 11

def configure(gitlab, ldap)
  raise NotImplementedError
end

#perform(release, *rspec_args) ⇒ Object

rubocop:disable Metrics/AbcSize



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
# File 'lib/gitlab/qa/scenario/test/integration/ldap.rb', line 16

def perform(release, *rspec_args)
  Component::Gitlab.perform do |gitlab|
    gitlab.release = release
    gitlab.name = gitlab_name
    gitlab.network = 'test'
    gitlab.tls = tls

    Component::LDAP.perform do |ldap|
      ldap.name = 'ldap-server'
      ldap.network = 'test'
      ldap.set_gitlab_credentials
      ldap.tls = tls

      configure(gitlab, ldap)

      ldap.instance do
        gitlab.instance do
          puts "Running #{spec_suite} specs!"

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