Class: Gitlab::QA::Scenario::Test::Integration::Opensearch
- Inherits:
-
Gitlab::QA::Scenario::Template
- Object
- Gitlab::QA::Scenario::Template
- Gitlab::QA::Scenario::Test::Integration::Opensearch
- Defined in:
- lib/gitlab/qa/scenario/test/integration/opensearch.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
- #before_perform(release) ⇒ Object
- #empty_index ⇒ Object
-
#initialize ⇒ Opensearch
constructor
A new instance of Opensearch.
- #perform(release, *rspec_args) ⇒ Object
- #setup_opensearch_on(instance) ⇒ Object
Methods inherited from Gitlab::QA::Scenario::Template
Constructor Details
#initialize ⇒ Opensearch
Returns a new instance of Opensearch.
11 12 13 14 15 |
# File 'lib/gitlab/qa/scenario/test/integration/opensearch.rb', line 11 def initialize @gitlab_name = 'gitlab-opensearch' # Currently the test suite that tests Advanced Search features is called 'Elasticsearch' which we hope to abstract to 'Advancedsearch' in the future @spec_suite = 'QA::EE::Scenario::Test::Integration::Elasticsearch' end |
Instance Attribute Details
#gitlab_name ⇒ Object (readonly)
Returns the value of attribute gitlab_name.
9 10 11 |
# File 'lib/gitlab/qa/scenario/test/integration/opensearch.rb', line 9 def gitlab_name @gitlab_name end |
#spec_suite ⇒ Object (readonly)
Returns the value of attribute spec_suite.
9 10 11 |
# File 'lib/gitlab/qa/scenario/test/integration/opensearch.rb', line 9 def spec_suite @spec_suite end |
Instance Method Details
#before_perform(release) ⇒ Object
17 18 19 |
# File 'lib/gitlab/qa/scenario/test/integration/opensearch.rb', line 17 def before_perform(release) raise ArgumentError, 'OpenSearch is an EE only feature!' unless release.ee? end |
#empty_index ⇒ Object
47 48 49 |
# File 'lib/gitlab/qa/scenario/test/integration/opensearch.rb', line 47 def empty_index @empty_index ||= ["gitlab-rake gitlab:elastic:create_empty_index"] end |
#perform(release, *rspec_args) ⇒ Object
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 |
# File 'lib/gitlab/qa/scenario/test/integration/opensearch.rb', line 21 def perform(release, *rspec_args) release = QA::Release.new(release) before_perform(release) Component::Gitlab.perform do |gitlab| gitlab.release = release setup_opensearch_on gitlab Component::Opensearch.perform do |opensearch| opensearch.network = 'test' opensearch.instance do gitlab.instance do Runtime::Logger.info("Running #{spec_suite} 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 |
#setup_opensearch_on(instance) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/gitlab/qa/scenario/test/integration/opensearch.rb', line 51 def setup_opensearch_on(instance) instance.name = gitlab_name instance.network = 'test' instance.elastic_url = "http://elastic68:9200" instance.exec_commands = empty_index end |