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

QE: Get rid of tools pool repos #9674

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
24 changes: 6 additions & 18 deletions testsuite/features/secondary/min_ansible_control_node.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 SUSE LLC
# Copyright (c) 2021-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@scope_ansible
Expand All @@ -9,17 +9,12 @@ Feature: Operate an Ansible control node in a normal minion

Scenario: Pre-requisite: Deploy test playbooks and inventory file
When I deploy testing playbooks and inventory files to "sle_minion"
@skip_if_github_validation
@susemanager
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_update_repo tools_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"

# TODO: Check why tools_update_repo is not available on the openSUSE minion
# TODO: Check why tools_update_repo is not available on the openSUSE minion
@skip_if_github_validation
@uyuni
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_pool_repo os_pool_repo" on this "sle_minion"
Scenario: Pre-requisite: Enable OS pool repository
When I enable repository "os_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"

Scenario: Enable "Ansible control node" system type
Expand Down Expand Up @@ -90,16 +85,9 @@ Feature: Operate an Ansible control node in a normal minion
And I remove package "orion-dummy" from this "sle_minion" without error control
And I remove "/tmp/file.txt" from "sle_minion"

@skip_if_github_validation
@susemanager
Scenario: Cleanup: Disable client tools repositories
Given I am on the Systems overview page of this "sle_minion"
When I disable the repositories "tools_update_repo tools_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"

@skip_if_github_validation
@uyuni
Scenario: Cleanup: Disable client tools repositories
Scenario: Cleanup: Disable OS pool repository
Given I am on the Systems overview page of this "sle_minion"
When I disable the repositories "tools_pool_repo os_pool_repo" on this "sle_minion"
When I disable repository "os_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"
8 changes: 0 additions & 8 deletions testsuite/features/secondary/min_deblike_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ Feature: Monitor SUMA environment with Prometheus on a Debian-like Salt minion
As an authorized user
I want to enable Prometheus exporters

@skip_if_github_validation
Scenario: Pre-requisite: enable Prometheus exporters repository on the Debian-like minion
When I enable the necessary repositories before installing Prometheus exporters on this "deblike_minion"

Scenario: Log in as org admin user
Given I am authorized

Expand Down Expand Up @@ -69,7 +65,3 @@ Feature: Monitor SUMA environment with Prometheus on a Debian-like Salt minion
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
Scenario: Cleanup: disable Prometheus exporters repository on the Debian-like minion
When I disable the necessary repositories before installing Prometheus exporters on this "deblike_minion" without error control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017-2023 SUSE LLC
# Copyright (c) 2017-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@scope_openscap
Expand All @@ -16,7 +16,6 @@ Feature: OpenSCAP audit of Debian-like Salt minion
@skip_if_github_validation
Scenario: Enable all the necessary repositories for OpenSCAP on Debian-like minion
When I enable Debian-like "universe" repository on "deblike_minion"
And I enable the repositories "tools_update_repo tools_pool_repo" on this "deblike_minion"

@skip_if_github_validation
Scenario: Install the OpenSCAP packages on the Debian-like minion
Expand Down Expand Up @@ -84,5 +83,4 @@ Feature: OpenSCAP audit of Debian-like Salt minion

@skip_if_github_validation
Scenario: Cleanup: remove all the necessary repositories for OpenSCAP on Debian-like minion
When I disable the repositories "tools_update_repo tools_pool_repo" on this "deblike_minion"
And I disable Debian-like "universe" repository on "deblike_minion"
13 changes: 2 additions & 11 deletions testsuite/features/secondary/min_monitoring.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024 SUSE LLC
# Copyright (c) 2022-2025 SUSE LLC
# Licensed under the terms of the MIT license.
# This feature depends on:
# - features/secondary/srv_monitoring.feature : As this feature disable/re-enable monitoring capabilities
Expand All @@ -11,11 +11,6 @@ Feature: Monitor SUMA environment with Prometheus on a SLE Salt minion
As an authorized user
I want to enable Prometheus exporters

@skip_if_github_validation
Scenario: Pre-requisite: enable Prometheus exporters repository on the minion
When I enable the necessary repositories before installing Prometheus exporters on this "sle_minion"
And I refresh the metadata for "sle_minion"

Scenario: Log in as org admin user
Given I am authorized

Expand Down Expand Up @@ -56,7 +51,7 @@ Feature: Monitor SUMA environment with Prometheus on a SLE Salt minion
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
@skip_if_github_validation
Scenario: Wait for services
When I wait until "prometheus" service is active on "sle_minion"
And I wait until "node" exporter service is active on "sle_minion"
Expand All @@ -82,7 +77,3 @@ Feature: Monitor SUMA environment with Prometheus on a SLE Salt minion
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
Scenario: Cleanup: disable Prometheus exporters repository
When I disable the necessary repositories before installing Prometheus exporters on this "sle_minion" without error control
16 changes: 4 additions & 12 deletions testsuite/features/secondary/min_rhlike_monitoring.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024 SUSE LLC
# Copyright (c) 2022-2025 SUSE LLC
# Licensed under the terms of the MIT license.
# This feature depends on:
# - features/secondary/srv_monitoring.feature: as this feature disables/re-enables monitoring capabilities
Expand All @@ -12,10 +12,6 @@ Feature: Monitor SUMA environment with Prometheus on a Red Hat-like Salt minion
As an authorized user
I want to enable Prometheus exporters

@skip_if_github_validation
Scenario: Pre-requisite: enable Prometheus exporters repository on the Red Hat-like minion
When I enable the necessary repositories before installing Prometheus exporters on this "rhlike_minion"

Scenario: Log in as org admin user
Given I am authorized

Expand All @@ -39,14 +35,14 @@ Feature: Monitor SUMA environment with Prometheus on a Red Hat-like Salt minion
And I click on "Save"
Then I should see a "Formula saved" text

@skip_if_github_validation
@skip_if_github_validation
Scenario: Apply highstate for Prometheus exporters on the Red Hat-like minion
When I follow "States" in the content area
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
@skip_if_github_validation
Scenario: Wait for service
When I wait until "node" exporter service is active on "rhlike_minion"
And I wait until "apache" exporter service is active on "rhlike_minion"
Expand All @@ -63,13 +59,9 @@ Feature: Monitor SUMA environment with Prometheus on a Red Hat-like Salt minion
And I click on "Save"
Then I wait until I see "Formula saved" text

@skip_if_github_validation
@skip_if_github_validation
Scenario: Cleanup: apply highstate after test monitoring on the Red Hat-like minion
When I follow "States" in the content area
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
Scenario: Cleanup: disable Prometheus exporters repository on the Red Hat-like minion
When I disable the necessary repositories before installing Prometheus exporters on this "rhlike_minion" without error control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017-2024 SUSE LLC
# Copyright (c) 2017-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@scope_openscap
Expand All @@ -16,7 +16,6 @@ Feature: OpenSCAP audit of Red Hat-like Salt minion
@skip_if_github_validation
Scenario: Enable repositories for openSCAP on the Red Hat-like minion
When I enable the repositories "Rocky-BaseOS Rocky-AppStream" on this "rhlike_minion"
And I enable the repositories "tools_update_repo tools_pool_repo" on this "rhlike_minion"
And I refresh the metadata for "rhlike_minion"

@skip_if_github_validation
Expand Down Expand Up @@ -83,7 +82,6 @@ Feature: OpenSCAP audit of Red Hat-like Salt minion
Scenario: Cleanup: remove the OpenSCAP packages from the Red Hat-like minion
When I remove OpenSCAP dependencies from "rhlike_minion"
And I disable repository "Rocky-BaseOS" on this "rhlike_minion"
And I disable the repositories "tools_update_repo tools_pool_repo" on this "rhlike_minion"

@skip_if_github_validation
Scenario: Cleanup: restore the base channel for the Red Hat-like minion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 SUSE LLC
# Copyright (c) 2021-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@skip_if_github_validation
Expand All @@ -13,15 +13,10 @@ Feature: Operate an Ansible control node in SSH minion
Scenario: Pre-requisite: Deploy test playbooks and inventory file
When I deploy testing playbooks and inventory files to "ssh_minion"

@susemanager
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_update_repo tools_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"

# TODO: Check why tools_update_repo is not available on the openSUSE minion
@uyuni
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_pool_repo os_pool_repo" on this "ssh_minion"
Scenario: Pre-requisite: Enable OS pool repository
When I enable repository "os_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"

Scenario: Enable "Ansible control node" system type
Expand Down Expand Up @@ -92,14 +87,8 @@ Feature: Operate an Ansible control node in SSH minion
And I remove package "orion-dummy" from this "ssh_minion" without error control
And I remove "/tmp/file.txt" from "ssh_minion"

@susemanager
Scenario: Cleanup: Disable client tools repositories
Given I am on the Systems overview page of this "ssh_minion"
When I disable the repositories "tools_update_repo tools_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"

@uyuni
Scenario: Cleanup: Disable client tools repositories
Scenario: Cleanup: Disable OS pool repository
Given I am on the Systems overview page of this "ssh_minion"
When I disable the repositories "tools_pool_repo os_pool_repo" on this "ssh_minion"
When I disable repository "os_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"
17 changes: 0 additions & 17 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1301,23 +1301,6 @@
end
end

When(/^I (enable|disable) the necessary repositories before installing Prometheus exporters on this "([^"]*)"((?: without error control)?)$/) do |action, host, error_control|
node = get_target(host)
os_version = node.os_version.gsub('-SP', '.')
os_family = node.os_family
# TODO: Check why tools_update_repo is not available on the openSUSE minion
repositories = os_family.match?(/^opensuse/) ? 'tools_pool_repo' : 'tools_pool_repo tools_update_repo'
if (os_family.match?(/^opensuse/) || os_family.match?(/^sles/)) && (product != 'Uyuni')
repositories.concat(' tools_additional_repo')
# Needed because in SLES15SP3 and openSUSE 15.3 and higher, firewalld will replace this package.
# But the tools_update_repo's priority doesn't allow to cope with the obsoletes option from firewalld.
if os_version.to_f >= 15.3
node.run('zypper addlock -r tools_additional_repo firewalld-prometheus-config')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure if that still need. So, I need to run these changes in a pipeline, to assure this is fine.
But... I first need to merge and rebase my pending PRs: #9670 #9667

end
end
step %(I #{action} the repositories "#{repositories}" on this "#{host}"#{error_control})
end

When(/^I apply "([^"]*)" local salt state on "([^"]*)"$/) do |state, host|
node = get_target(host)
salt_call = use_salt_bundle ? 'venv-salt-call' : 'salt-call'
Expand Down
Loading