Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport BV stability improvement #8067

Merged
merged 2 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ Feature: Smoke tests for <client>
@skip_for_debianlike
Scenario: Install a patch on the <client>
When I follow "Software" in the content area
And I wait until I see "Upgrade Packages" text
And I follow "Patches" in the content area
When I wait until I see "Relevant Patches" text
And I select "Non-Critical" from "type"
And I click on "Show"
When I check the first patch in the list
Expand All @@ -48,7 +50,9 @@ Feature: Smoke tests for <client>
@skip_for_sle_micro_ssh_minion
Scenario: Install a package on the <client>
When I follow "Software" in the content area
And I wait until I see "Upgrade Packages" text
And I follow "Install"
And I wait until I see "Installable Packages" text
And I enter the package for "<client>" as the filtered package name
And I click on the filter button
And I check the package for "<client>" in the list
Expand All @@ -61,6 +65,7 @@ Feature: Smoke tests for <client>
@skip_for_sle_micro_ssh_minion
Scenario: Remove package from <client>
When I follow "Software" in the content area
And I wait until I see "Upgrade Packages" text
And I follow "List / Remove"
And I enter the package for "<client>" as the filtered package name
And I click on the filter button
Expand All @@ -87,20 +92,26 @@ Feature: Smoke tests for <client>
Scenario: Check that Software package refresh works on a <client>
Given I am on the Systems overview page of this "<client>"
When I follow "Software" in the content area
And I wait until I see "Upgrade Packages" text
And I click on "Update Package List"
And I wait until event "Package List Refresh scheduled by admin" is completed

Scenario: Check that Hardware Refresh button works on a <client>
When I follow "Details" in the content area
And I wait until I see "System Status" text
And I follow "Hardware"
And I wait until I see "Refresh Hardware List" text
And I click on "Schedule Hardware Refresh"
Then I should see a "You have successfully scheduled a hardware profile refresh" text
And I wait until event "Hardware List Refresh scheduled by admin" is completed

Scenario: Subscribe a <client> to the configuration channel
When I follow "Configuration" in the content area
And I wait until I see "Configuration Overview" text
And I follow "Manage Configuration Channels" in the content area
And I wait until I see "centrally-managed configuration" text
And I follow first "Subscribe to Channels" in the content area
And I wait until I see "Select Channels for Subscription" text
And I check "Mixed Channel" in the list
And I click on "Continue"
And I click on "Update Channel Rankings"
Expand All @@ -109,8 +120,11 @@ Feature: Smoke tests for <client>

Scenario: Deploy the configuration file to <client>
And I follow the left menu "Configuration > Channels"
And I wait until I see "Centrally Managed Configuration Channel" text
And I follow "Mixed Channel"
And I wait until I see "Channel Properties" text
And I follow "Deploy all configuration files to selected subscribed systems"
And I wait until I see "Select Systems for Deployment" text
And I enter the hostname of "<client>" as the filtered system name
And I click on the filter button
And I check the "<client>" client
Expand All @@ -135,8 +149,11 @@ Feature: Smoke tests for <client>
@skip_for_sle_micro
# The client tools of SLE Micro (intentionally) do not contain spacecmd
Scenario: Install spacecmd from the client tools on the <client>
Given I am on the Systems overview page of this "<client>"
When I follow "Software" in the content area
And I wait until I see "Upgrade Packages" text
And I follow "Install"
And I wait until I see "Installable Packages" text
And I enter "spacecmd" as the filtered package name
And I click on the filter button
And I check "spacecmd" in the list
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/step_definitions/common_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
end

When(/^I wait at most (\d+) seconds until event "([^"]*)" is completed$/) do |final_timeout, event|
step %(I wait 90 seconds until the event is picked up and #{final_timeout} seconds until the event "#{event}" is completed)
step %(I wait 180 seconds until the event is picked up and #{final_timeout} seconds until the event "#{event}" is completed)
end

When(/^I wait until I see the event "([^"]*)" completed during last minute, refreshing the page$/) do |event|
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/step_definitions/navigation_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
Then(/^I should be logged in$/) do
xpath_query = '//a[@href=\'/rhn/Logout.do\']'
# Check if the user is logged in, using the specified wait_time
raise ScriptError, 'User is not logged in' unless has_selector?(:xpath, xpath_query, wait: Capybara.default_max_wait_time * 2)
raise ScriptError, 'User is not logged in' unless has_selector?(:xpath, xpath_query, wait: Capybara.default_max_wait_time * 3)
end

Then(/^I am logged in$/) do
Expand Down
13 changes: 10 additions & 3 deletions testsuite/features/step_definitions/setup_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,17 @@
When I follow the left menu "Systems > System List > All"
And I wait until I see the name of "#{host}", refreshing the page
And I follow this "#{host}" link
And I wait 180 seconds until the event is picked up and 500 seconds until the event "Apply states" is completed
And I wait 180 seconds until the event is picked up and 500 seconds until the event "Hardware List Refresh" is completed
And I wait 180 seconds until the event is picked up and 500 seconds until the event "Package List Refresh" is completed
And I wait until I see "System Status" text
)
if get_client_type(host) == 'traditional' && is_salt.empty?
get_target(host).run('rhn_check -vvv')
else
steps %(
And I wait 180 seconds until the event is picked up and #{DEFAULT_TIMEOUT} seconds until the event "Apply states" is completed
And I wait 180 seconds until the event is picked up and #{DEFAULT_TIMEOUT} seconds until the event "Hardware List Refresh" is completed
And I wait 180 seconds until the event is picked up and #{DEFAULT_TIMEOUT} seconds until the event "Package List Refresh" is completed
)
end
end

Then(/^I should see "([^"]*)" via spacecmd$/) do |host|
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def capybara_register_driver
Capybara.register_driver(:headless_chrome) do |app|
client = Selenium::WebDriver::Remote::Http::Default.new
# WORKAROUND failure at Scenario: Test IPMI functions: increase from 60 s to 180 s
client.read_timeout = 180
client.read_timeout = 240
# Chrome driver options
chrome_options = %w[no-sandbox disable-dev-shm-usage ignore-certificate-errors disable-gpu window-size=2048,2048 js-flags=--max_old_space_size=2048]
chrome_options << 'headless' unless $debug_mode
Expand Down