Class: Gitlab::QA::Scenario::Test::Integration::OAuth

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

perform

Constructor Details

#initializeOAuth

Returns a new instance of OAuth.



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

def initialize
  @gitlab_name = 'gitlab'
end

Instance Attribute Details

#gitlab_nameObject (readonly)

Returns the value of attribute gitlab_name.



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

def gitlab_name
  @gitlab_name
end

Instance Method Details

#perform(release, *rspec_args) ⇒ Object



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

def perform(release, *rspec_args)
  Runtime::Env.require_oauth_environment!

  release = Release.new(release)

  Component::Gitlab.perform do |gitlab|
    gitlab.release = release
    gitlab.network = 'test'
    gitlab.name = gitlab_name
    gitlab.tls = true

    gitlab.omnibus_configuration << gitlab_omnibus_configuration(gitlab.address)

    gitlab.instance do
      Runtime::Logger.info('Running OAuth specs!')

      Component::Specs.perform do |specs|
        rspec_args << '--' unless rspec_args.include?('--')
        rspec_args << %w[--tag oauth]
        specs.suite = 'Test::Instance::All'
        specs.release = release
        specs.network = gitlab.network
        specs.args = [gitlab.address, *rspec_args]
      end
    end
  end
end