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