Class: Gitlab::QA::Scenario::Test::Omnibus::Upgrade

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

Instance Method Summary collapse

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

perform

Instance Method Details

#perform(image = 'CE', *rspec_args) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/gitlab/qa/scenario/test/omnibus/upgrade.rb', line 12

def perform(image = 'CE', *rspec_args)
  ce_release = QA::Release.new(image)

  if ce_release.ee?
    raise ArgumentError, 'Only CE can be upgraded to EE!'
  end

  Docker::Volumes.new.with_temporary_volumes do |volumes|
    Scenario::Test::Instance::Image
      .perform(ce_release, *rspec_args) do |scenario|
      scenario.volumes = volumes
    end

    Scenario::Test::Instance::Image
      .perform(ce_release.to_ee, *rspec_args) do |scenario|
      scenario.volumes = volumes
      scenario.seed_admin_token = false
    end
  end
end