diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2019-07-23 00:15:19 +0000 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2019-07-23 00:15:19 +0000 |
commit | 62e11948544413aa4968fb6e98bf5ecb2acca7c6 (patch) | |
tree | 1294cbc96d8ebaf01af7c86de34ccbb12bc37d0b /qa | |
parent | f3ba070a0ae113bad9187542f34dc14a12b273ca (diff) | |
download | gitlab-ce-62e11948544413aa4968fb6e98bf5ecb2acca7c6.tar.gz |
Run gitlab-ctl reconfigure after replication
On the Geo secondary, we need to re-run
gitlab-ctl reconfigure on the secondary,
otherwise FDW does not work.
Re-order Geo QA secondary functions
So they more closely match execution order.
Unquarantine the Geo attachment test
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/ee/scenario/test/geo.rb | 38 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/ee_geo/attachment_replication_spec.rb | 3 |
2 files changed, 26 insertions, 15 deletions
diff --git a/qa/qa/ee/scenario/test/geo.rb b/qa/qa/ee/scenario/test/geo.rb index 360a4ddf657..53c5f1aca1d 100644 --- a/qa/qa/ee/scenario/test/geo.rb +++ b/qa/qa/ee/scenario/test/geo.rb @@ -34,6 +34,7 @@ module QA Geo::Secondary.act do replicate_database + reconfigure wait_for_services authorize end @@ -106,19 +107,6 @@ module QA @name = QA::Runtime::Scenario.geo_secondary_name end - def authorize - # Provide OAuth authorization now so that tests don't have to - QA::Runtime::Browser.visit(:geo_secondary, QA::Page::Main::Login) do - QA::Page::Main::Login.perform(&:sign_in_using_credentials) - QA::Page::Main::OAuth.perform do |oauth| - oauth.authorize! if oauth.needs_authorization? - end - - # Log out so that tests are in an initially unauthenticated state - QA::Page::Main::Menu.perform(&:sign_out) - end - end - def replicate_database puts 'Starting Geo replication on secondary node ...' @@ -133,6 +121,17 @@ module QA end end + def reconfigure + # Without this step, the /var/opt/gitlab/postgresql/data/pg_hba.conf + # that is left behind from 'gitlab_ctl "replicate-geo-database ..' + # does not allow FDW to work. + puts 'Reconfiguring ...' + + QA::Service::Omnibus.new(@name).act do + gitlab_ctl 'reconfigure' + end + end + def wait_for_services puts 'Waiting until secondary node services are ready ...' @@ -156,6 +155,19 @@ module QA raise "Secondary node did not start correctly in #{Time.now - start} seconds!" end end + + def authorize + # Provide OAuth authorization now so that tests don't have to + QA::Runtime::Browser.visit(:geo_secondary, QA::Page::Main::Login) do + QA::Page::Main::Login.perform(&:sign_in_using_credentials) + QA::Page::Main::OAuth.perform do |oauth| + oauth.authorize! if oauth.needs_authorization? + end + + # Log out so that tests are in an initially unauthenticated state + QA::Page::Main::Menu.perform(&:sign_out) + end + end end end end diff --git a/qa/qa/specs/features/browser_ui/ee_geo/attachment_replication_spec.rb b/qa/qa/specs/features/browser_ui/ee_geo/attachment_replication_spec.rb index 6154d087734..cce2e760de8 100644 --- a/qa/qa/specs/features/browser_ui/ee_geo/attachment_replication_spec.rb +++ b/qa/qa/specs/features/browser_ui/ee_geo/attachment_replication_spec.rb @@ -1,8 +1,7 @@ # frozen_string_literal: true module QA - # https://gitlab.com/gitlab-org/quality/nightly/issues/109 - context 'Geo', :orchestrated, :geo, :quarantine do + context 'Geo', :orchestrated, :geo do describe 'GitLab Geo attachment replication' do let(:file_to_attach) { File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif')) } |