Class: Gitlab::QA::Scenario::Test::Integration::GitalyHA
- Inherits:
-
Gitlab::QA::Scenario::Template
- Object
- Gitlab::QA::Scenario::Template
- Gitlab::QA::Scenario::Test::Integration::GitalyHA
- Defined in:
- lib/gitlab/qa/scenario/test/integration/gitaly_ha.rb
Instance Attribute Summary collapse
-
#gitlab_name ⇒ Object
readonly
Returns the value of attribute gitlab_name.
-
#spec_suite ⇒ Object
readonly
Returns the value of attribute spec_suite.
Instance Method Summary collapse
-
#initialize ⇒ GitalyHA
constructor
A new instance of GitalyHA.
-
#perform(release, *rspec_args) ⇒ Object
rubocop:disable Metrics/AbcSize.
Methods inherited from Gitlab::QA::Scenario::Template
Constructor Details
#initialize ⇒ GitalyHA
Returns a new instance of GitalyHA.
9 10 11 12 13 14 15 16 17 |
# File 'lib/gitlab/qa/scenario/test/integration/gitaly_ha.rb', line 9 def initialize @gitlab_name = 'gitlab-gitaly-ha' @primary_node = 'gitaly1' @secondary_node = 'gitaly2' @praefect_node = 'praefect' @database = 'postgres' @spec_suite = 'Test::Integration::GitalyHA' @network = 'test' end |
Instance Attribute Details
#gitlab_name ⇒ Object (readonly)
Returns the value of attribute gitlab_name.
7 8 9 |
# File 'lib/gitlab/qa/scenario/test/integration/gitaly_ha.rb', line 7 def gitlab_name @gitlab_name end |
#spec_suite ⇒ Object (readonly)
Returns the value of attribute spec_suite.
7 8 9 |
# File 'lib/gitlab/qa/scenario/test/integration/gitaly_ha.rb', line 7 def spec_suite @spec_suite end |
Instance Method Details
#perform(release, *rspec_args) ⇒ Object
rubocop:disable Metrics/AbcSize
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/gitlab/qa/scenario/test/integration/gitaly_ha.rb', line 20 def perform(release, *rspec_args) gitaly(@primary_node, release) do gitaly(@secondary_node, release) do Component::PostgreSQL.perform do |sql| sql.name = @database sql.network = @network sql.instance do sql.run_psql '-d template1 -c "CREATE DATABASE praefect_production OWNER postgres"' Component::Gitlab.perform do |praefect| praefect.release = QA::Release.new(release) praefect.name = @praefect_node praefect.network = @network praefect.skip_availability_check = true praefect.omnibus_config = praefect_omnibus_configuration praefect.instance do Component::Gitlab.perform do |gitlab| gitlab.release = QA::Release.new(release) gitlab.name = gitlab_name gitlab.network = @network gitlab.omnibus_config = gitlab_omnibus_configuration gitlab.instance do puts "Running Gitaly HA specs!" Component::Specs.perform do |specs| specs.suite = spec_suite specs.release = gitlab.release specs.network = gitlab.network specs.args = [gitlab.address, *rspec_args] end end end end end end end end end end |