Removes Airborne from E2E tests
What does this MR do and why?
- Removes the usage of
airborne
from the Geo E2E API tests. - Fix Rubocop infractions in the Geo spec (mostly replacing instance variables with
let
) - Removes the airborne dependency
This is to prevent confusion over whether to use airborne
or Support::API
. When we have both and we aren't explicit, it can lead to issues when the wrong module is invoked. e.g:
Resolves gitlab-org/quality/quality-engineering/team-tasks#1115 (closed)
Passing test results
Note, the Geo tests don't run in MRs or in staging. To test I had to execute locally against staging-ref;
Running locally
This updates a number of orchestrated tests so it is probably more efficient to look at pipeline results.
To run locally against staging-ref apply the following patch (we can skip setup as Geo is already configured on staging-ref):
diff --git a/qa/qa/ee/scenario/test/geo.rb b/qa/qa/ee/scenario/test/geo.rb
index 695ed72d8176..6c57011708d7 100644
--- a/qa/qa/ee/scenario/test/geo.rb
+++ b/qa/qa/ee/scenario/test/geo.rb
@@ -25,21 +25,7 @@ def perform(options, *rspec_options)
QA::Support::GitlabAddress.define_gitlab_address_attribute!(QA::Runtime::Scenario.geo_primary_address)
QA::Runtime::Scenario.define(:network, 'geo')
- unless options[:geo_skip_setup?]
- Geo::Primary.act do
- add_license
- set_replication_password
- set_primary_node
- add_secondary_node
- end
- Geo::Secondary.act do
- replicate_database
- reconfigure
- wait_for_services
- authorize
- end
- end
# Save the scenario class name
QA::Runtime::Scenario.define(:klass, self.class.name)
diff --git a/qa/qa/runtime/address.rb b/qa/qa/runtime/address.rb
index c622051bb6da..e76ae7ebd25e 100644
--- a/qa/qa/runtime/address.rb
+++ b/qa/qa/runtime/address.rb
@@ -12,7 +12,13 @@ def initialize(instance, page)
def host
if @instance.is_a?(Symbol)
- Runtime::Scenario.send("#{@instance}_address")
+ if @instance == :geo_primary
+ "https://staging-ref.gitlab.com"
+ elsif @instance == :geo_secondary
+ "https://geo.staging-ref.gitlab.com"
+ else
+ Runtime::Scenario.send("#{@instance}_address")
+ end
else
@instance.to_s
end
Run the test:
GEO_STAGING_REF_URL="https://geo.staging-ref.gitlab.com" GITLAB_QA_ACCESS_TOKEN=1P QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=https://staging-ref.gitlab.com GITLAB_ADMIN_USERNAME=gitlab-qa-admin GITLAB_ADMIN_PASSWORD=1P bundle exec rspec qa/specs/features/ee/api/12_systems/geo/geo_nodes_spec.rb
Edited by Jay McCure