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
# 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 << <<~OMNIBUS
      git_data_dirs({
        'default' => {
          'path' => '/var/opt/gitlab/git-data/repositories/default'
        },
        'secondary' => {
          'path' => '/var/opt/gitlab/git-data/repositories/secondary'
        }
      });
    OMNIBUS

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

    gitlab.instance do
      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_ADDITIONAL_REPOSITORY_STORAGE' => 'secondary' }
      end
    end
  end
end