Class: Gitlab::QA::Scenario::Test::Instance::RepositoryStorage

Inherits:
Image show all
Defined in:
lib/gitlab/qa/scenario/test/instance/repository_storage.rb

Instance Attribute Summary

Attributes inherited from Image

#seed_admin_token, #volumes

Instance Method Summary collapse

Methods inherited from Image

#initialize

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

perform

Constructor Details

This class inherits a constructor from Gitlab::QA::Scenario::Test::Instance::Image

Instance Method Details

#perform(release, *rspec_args) ⇒ Object



9
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
# File 'lib/gitlab/qa/scenario/test/instance/repository_storage.rb', line 9

def perform(release, *rspec_args)
  Component::Gitlab.perform do |gitlab|
    gitlab.release = QA::Release.new(release)
    gitlab.name = 'gitlab'
    gitlab.network = 'test'
    gitlab.omnibus_configuration << gitlab_omnibus_configuration
    cluster = Component::GitalyCluster.perform do |c|
      c.config = Component::GitalyCluster::GitalyClusterConfig.new(gitlab_name: 'gitlab')
      c.release = release
      c.instance
    end

    gitlab.instance do
      cluster.join

      rspec_args << "--" unless rspec_args.include?('--')
      rspec_args << %w[--tag repository_storage]

      Component::Specs.perform do |specs|
        specs.suite = 'Test::Instance::All'
        specs.release = gitlab.release
        specs.network = gitlab.network
        specs.args = [gitlab.address, *rspec_args]
        specs.env = {
          'QA_PRAEFECT_REPOSITORY_STORAGE' => 'default',
          'QA_GITALY_NON_CLUSTER_STORAGE' => 'gitaly',
          'QA_ADDITIONAL_REPOSITORY_STORAGE' => 'secondary'
        }
      end
    end
  end
end