Commit 56dffeb6 authored by Jennifer Louie's avatar Jennifer Louie Committed by Mark Lapierre

Add debug logs to Geo E2E specs

parent 5c2c6c72
......@@ -14,6 +14,7 @@ module QA
end
def wait_for_project_replication(project_name)
QA::Runtime::Logger.debug(%Q[#{self.class.name} - wait_for_project_replication])
wait_until(max_duration: Runtime::Geo.max_db_replication_time) do
filter_by_name(project_name)
......
......@@ -6,12 +6,14 @@ module QA
module Project
module Show
def wait_for_repository_replication(max_wait: Runtime::Geo.max_file_replication_time)
QA::Runtime::Logger.debug(%Q[#{self.class.name} - wait_for_repository_replication])
wait_until_geo_max_replication_time(max_wait: max_wait) do
has_no_text?(/No repository|The repository for this project is empty/)
end
end
def wait_for_repository_replication_with(text, max_wait: Runtime::Geo.max_file_replication_time)
QA::Runtime::Logger.debug(%Q[#{self.class.name} - wait_for_repository_replication_with_text "#{text}"])
wait_until_geo_max_replication_time(max_wait: max_wait) do
page.has_text?(text)
end
......
......@@ -7,12 +7,14 @@ module QA
module Wiki
module Show
def wait_for_repository_replication(max_wait: Runtime::Geo.max_file_replication_time)
QA::Runtime::Logger.debug(%Q[#{self.class.name} - wait_for_repository_replication])
wait_until_geo_max_replication_time(max_wait: max_wait) do
has_no_text?(/No repository|The wiki for this project is empty/)
end
end
def wait_for_repository_replication_with(text, max_wait: Runtime::Geo.max_file_replication_time)
QA::Runtime::Logger.debug(%Q[#{self.class.name} - wait_for_repository_replication_with_text "#{text}"])
wait_until_geo_max_replication_time(max_wait: max_wait) do
page.has_text?(text)
end
......
......@@ -24,6 +24,8 @@ module QA
end
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -24,6 +24,8 @@ module QA
end
it 'replicates deletion of a project to secondary node' do
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -34,6 +34,8 @@ module QA
end
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......@@ -63,11 +65,7 @@ module QA
lfs_file_display_message = 'The rendered file could not be displayed because it is stored in LFS.'
project = nil
Runtime::Browser.visit(:geo_primary, QA::Page::Main::Login) do
# Visit the primary node and login
Page::Main::Login.perform(&:sign_in_using_credentials)
# Create a new Project
QA::Flow::Login.while_signed_in(address: :geo_primary) do
project = Resource::Project.fabricate! do |project|
project.name = 'geo-project'
project.description = 'Geo test project'
......@@ -94,10 +92,9 @@ module QA
end
end
Runtime::Browser.visit(:geo_secondary, QA::Page::Main::Login) do
# Visit the secondary node and login
Page::Main::Login.perform(&:sign_in_using_credentials)
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
end
......
......@@ -33,6 +33,8 @@ module QA
project.visit!
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......@@ -112,6 +114,8 @@ module QA
end
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -42,6 +42,8 @@ module QA
end
# check renamed project exist on secondary node
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -42,6 +42,8 @@ module QA
end
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......@@ -113,6 +115,8 @@ module QA
end
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -39,6 +39,8 @@ module QA
project.visit!
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......@@ -127,6 +129,8 @@ module QA
end
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -38,6 +38,8 @@ module QA
end
# Validate that wiki is synced on secondary node
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -42,6 +42,8 @@ module QA
end
it 'is redirected to the primary and ultimately replicated to the secondary' do
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -47,6 +47,8 @@ module QA
validate_content(push_content)
end
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
......@@ -36,6 +36,8 @@ module QA
end
it 'proxies wiki commit to primary node and ultmately replicates to secondary node' do
QA::Runtime::Logger.debug('Visiting the secondary geo node')
QA::Flow::Login.while_signed_in(address: :geo_secondary) do
EE::Page::Main::Banner.perform do |banner|
expect(banner).to have_secondary_read_only_banner
......
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