Class: Gitlab::QA::Scenario::Test::Integration::Import
- Inherits:
-
Gitlab::QA::Scenario::Template
- Object
- Gitlab::QA::Scenario::Template
- Gitlab::QA::Scenario::Test::Integration::Import
- Defined in:
- lib/gitlab/qa/scenario/test/integration/import.rb
Overview
Scenario type for testing importers
In addition to main gitlab instance, starts another gitlab instance to act as source
and mock server to replace all other possible import sources
Instance Attribute Summary collapse
-
#mock_server ⇒ Object
readonly
Returns the value of attribute mock_server.
-
#network ⇒ Object
readonly
Returns the value of attribute network.
-
#source_gitlab ⇒ Object
readonly
Returns the value of attribute source_gitlab.
-
#target_gitlab ⇒ Object
readonly
Returns the value of attribute target_gitlab.
Instance Method Summary collapse
-
#initialize ⇒ Import
constructor
A new instance of Import.
- #perform(release, *rspec_args) ⇒ Object
Methods inherited from Gitlab::QA::Scenario::Template
Constructor Details
#initialize ⇒ Import
Returns a new instance of Import.
16 17 18 19 20 21 22 23 24 |
# File 'lib/gitlab/qa/scenario/test/integration/import.rb', line 16 def initialize @network = "test" @source_gitlab = Component::Gitlab.new.tap { |gitlab| gitlab.network = @network } @target_gitlab = Component::Gitlab.new.tap { |gitlab| gitlab.network = @network } @mock_server = Component::MockServer.new.tap do |server| server.network = @network server.tls = true end end |
Instance Attribute Details
#mock_server ⇒ Object (readonly)
Returns the value of attribute mock_server.
26 27 28 |
# File 'lib/gitlab/qa/scenario/test/integration/import.rb', line 26 def mock_server @mock_server end |
#network ⇒ Object (readonly)
Returns the value of attribute network.
26 27 28 |
# File 'lib/gitlab/qa/scenario/test/integration/import.rb', line 26 def network @network end |
#source_gitlab ⇒ Object (readonly)
Returns the value of attribute source_gitlab.
26 27 28 |
# File 'lib/gitlab/qa/scenario/test/integration/import.rb', line 26 def source_gitlab @source_gitlab end |
#target_gitlab ⇒ Object (readonly)
Returns the value of attribute target_gitlab.
26 27 28 |
# File 'lib/gitlab/qa/scenario/test/integration/import.rb', line 26 def target_gitlab @target_gitlab end |
Instance Method Details
#perform(release, *rspec_args) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/gitlab/qa/scenario/test/integration/import.rb', line 28 def perform(release, *rspec_args) start_mock_server start_gitlab_instances(release) run_specs(rspec_args) ensure mock_server.teardown target_gitlab.teardown source_gitlab.teardown end |