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') ⇒ Object



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

def perform(image = 'CE')
  ce_release = 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) do |scenario|
      scenario.volumes = volumes
    end

    Scenario::Test::Instance::Image
      .perform(ce_release.to_ee) do |scenario|
      scenario.volumes = volumes
    end
  end
end