Class: Gitlab::QA::Scenario::Test::Integration::Elasticsearch
- Inherits:
-
Gitlab::QA::Scenario::Template
- Object
- Gitlab::QA::Scenario::Template
- Gitlab::QA::Scenario::Test::Integration::Elasticsearch
- Defined in:
- lib/gitlab/qa/scenario/test/integration/elasticsearch.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 ⇒ Elasticsearch
constructor
A new instance of Elasticsearch.
- #perform(release, *rspec_args) ⇒ Object
- #setup_elasticsearch_on(instance) ⇒ Object
Methods inherited from Gitlab::QA::Scenario::Template
Constructor Details
#initialize ⇒ Elasticsearch
Returns a new instance of Elasticsearch.
9 10 11 12 |
# File 'lib/gitlab/qa/scenario/test/integration/elasticsearch.rb', line 9 def initialize @gitlab_name = 'gitlab-elastic' @spec_suite = 'QA::EE::Scenario::Test::Integration::Elasticsearch' 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/elasticsearch.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/elasticsearch.rb', line 7 def spec_suite @spec_suite end |
Instance Method Details
#before_perform(release) ⇒ Object
14 15 16 |
# File 'lib/gitlab/qa/scenario/test/integration/elasticsearch.rb', line 14 def before_perform(release) raise ArgumentError, 'Elasticsearch is an EE only feature!' unless release.ee? end |
#empty_index ⇒ Object
44 45 46 |
# File 'lib/gitlab/qa/scenario/test/integration/elasticsearch.rb', line 44 def empty_index @empty_index ||= ["gitlab-rake gitlab:elastic:create_empty_index"] end |
#perform(release, *rspec_args) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/gitlab/qa/scenario/test/integration/elasticsearch.rb', line 18 def perform(release, *rspec_args) release = QA::Release.new(release) before_perform(release) Component::Gitlab.perform do |gitlab| gitlab.release = release setup_elasticsearch_on gitlab Component::Elasticsearch.perform do |elastic| elastic.network = 'test' elastic.instance do gitlab.instance do puts "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_elasticsearch_on(instance) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/gitlab/qa/scenario/test/integration/elasticsearch.rb', line 48 def setup_elasticsearch_on(instance) instance.name = gitlab_name instance.network = 'test' instance.elastic_url = 'http://elastic68:9200' instance.exec_commands = empty_index end |