Commit 19ab50af authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-unquarantine-attachment-test' into 'master'

Unquarantine Geo attachment test

Closes gitlab-org/quality/nightly#109

See merge request gitlab-org/gitlab-ee!14738
parents f3ba070a 62e11948
......@@ -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
......
# 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')) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment