Class: Gitlab::QA::Scenario::Test::Instance::Image

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

Direct Known Subclasses

RelativeUrl, RepositoryStorage

Instance Attribute Summary collapse

Instance Method Summary collapse

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

perform

Constructor Details

#initializeImage

Returns a new instance of Image.



11
12
13
14
# File 'lib/gitlab/qa/scenario/test/instance/image.rb', line 11

def initialize
  @volumes = {}
  @seed_admin_token = true
end

Instance Attribute Details

#seed_admin_token=(value) ⇒ Object (writeonly)

Sets the attribute seed_admin_token

Parameters:

  • value

    the value to set the attribute seed_admin_token to.



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

def seed_admin_token=(value)
  @seed_admin_token = value
end

#volumes=(value) ⇒ Object (writeonly)

Sets the attribute volumes

Parameters:

  • value

    the value to set the attribute volumes to.



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

def volumes=(value)
  @volumes = value
end

Instance Method Details

#perform(release, *rspec_args) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/gitlab/qa/scenario/test/instance/image.rb', line 16

def perform(release, *rspec_args)
  Component::Gitlab.perform do |gitlab|
    gitlab.release = release
    gitlab.volumes = @volumes
    gitlab.network = 'test'
    gitlab.name = Runtime::Env.qa_gitlab_hostname
    gitlab.seed_admin_token = @seed_admin_token
    gitlab.tls = Runtime::Env.qa_gitlab_use_tls?

    gitlab.instance do
      Component::Specs.perform do |specs|
        specs.suite = 'Test::Instance::All'
        specs.hostname = "qa-e2e-specs.#{gitlab.network}"
        specs.release = gitlab.release
        specs.network = gitlab.network
        specs.args = [gitlab.address, *rspec_args]
      end
    end
  end
end