Class: Gitlab::QA::Scenario::Test::Omnibus::Update

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

Instance Method Summary collapse

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

perform

Instance Method Details

#perform(from_release, to_release = nil, *rspec_args) ⇒ Object



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

def perform(from_release, to_release = nil, *rspec_args)
  previous_release = QA::Release.new(from_release).previous_stable
  current_release = QA::Release.new(to_release || from_release)

  Docker::Volumes.new.with_temporary_volumes do |volumes|
    Component::Gitlab.perform do |gitlab|
      gitlab.release = previous_release
      gitlab.volumes = volumes
      gitlab.network = 'test'
      gitlab.launch_and_teardown_instance
    end

    Scenario::Test::Instance::Image
      .perform(current_release, *rspec_args) do |scenario|
      scenario.volumes = volumes
    end
  end
end