Skip to content

Commit

Permalink
Isolate synchronization of fake packages
Browse files Browse the repository at this point in the history
Co-authored-by: Oscar Barrios <obarrios@suse.com>
  • Loading branch information
Bischoff and srbarrios committed Oct 6, 2023
1 parent a62d7ed commit f4f7cca
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2022-2023 SUSE LLC
# Licensed under the terms of the MIT license.

@skip_if_github_validation
Feature: Update activation keys
In order to register systems to the spacewalk server
As admin
Expand All @@ -9,42 +10,6 @@ Feature: Update activation keys
Scenario: Log in as admin user
Given I am authorized for the "Admin" section

Scenario: Add a child channel to the base product channel
When I follow the left menu "Software > Manage > Channels"
And I follow "Create Channel"
And I enter "Fake-RPM-SUSE-Channel" as "Channel Name"
And I enter "fake-rpm-suse-channel" as "Channel Label"
And I select the parent channel for the "sle_minion" from "Parent Channel"
And I select "x86_64" from "Architecture:"
And I enter "Fake-RPM-SUSE-Channel for testing" as "Channel Summary"
And I enter "Description for Fake-RPM-SUSE-Channel Child Channel." as "Channel Description"
And I click on "Create Channel"
Then I should see a "Channel Fake-RPM-SUSE-Channel created." text

Scenario: Add the repository to the x86_64 child channel
When I follow the left menu "Software > Manage > Channels"
And I follow "Fake-RPM-SUSE-Channel"
And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL"
And I click on "Update Channel"
Then I should see a "Channel Fake-RPM-SUSE-Channel updated" text
When I follow "Repositories" in the content area
And I select the "fake-rpm-repo" repo
And I click on "Save Repositories"
Then I should see a "Fake-RPM-SUSE-Channel repository information was successfully updated" text

Scenario: Synchronize the repository in the x86_64 channel
When I enable source package syncing
And I follow the left menu "Software > Manage > Channels"
And I follow "Fake-RPM-SUSE-Channel"
And I follow "Repositories" in the content area
And I follow "Sync"
And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page
And I click on "Sync Now"
Then I should see a "Repository sync scheduled for Fake-RPM-SUSE-Channel." text
And I wait until the channel "fake-rpm-suse-channel" has been synced
And I disable source package syncing

@skip_if_github_validation
@scc_credentials
@susemanager
Scenario: Update SLE key with synced base product
Expand All @@ -68,7 +33,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key SUSE Test Key x86_64 has been modified" text

@skip_if_github_validation
@uyuni
Scenario: Update openSUSE Leap key with synced base product
When I follow the left menu "Systems > Activation Keys"
Expand All @@ -86,7 +50,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key SUSE Test Key x86_64 has been modified" text

@skip_if_github_validation
@scc_credentials
@susemanager
Scenario: Update SLE SSH key with synced base product
Expand All @@ -101,7 +64,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key SUSE SSH Test Key x86_64 has been modified" text

@skip_if_github_validation
@uyuni
Scenario: Update openSUSE Leap SSH key with synced base product
When I follow the left menu "Systems > Activation Keys"
Expand All @@ -119,7 +81,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key SUSE SSH Test Key x86_64 has been modified" text

@skip_if_github_validation
@scc_credentials
@susemanager
Scenario: Update SLE SSH tunnel key with synced base product
Expand All @@ -134,7 +95,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key SUSE SSH Tunnel Test Key x86_64 has been modified" text

@skip_if_github_validation
@uyuni
Scenario: Update openSUSE Leap SSH tunnel key with synced base product
When I follow the left menu "Systems > Activation Keys"
Expand All @@ -152,7 +112,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key SUSE SSH Tunnel Test Key x86_64 has been modified" text

@skip_if_github_validation
@scc_credentials
@susemanager
Scenario: Update the SLE Proxy key with synced base product
Expand All @@ -171,7 +130,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key Proxy Key x86_64 has been modified" text

@skip_if_github_validation
@uyuni
Scenario: Update the openSUSE Leap Proxy key with synced base product
When I follow the left menu "Systems > Activation Keys"
Expand All @@ -189,7 +147,6 @@ Feature: Update activation keys
And I click on "Update Activation Key"
Then I should see a "Activation key Proxy Key x86_64 has been modified" text

@skip_if_github_validation
@scc_credentials
@susemanager
Scenario: Update build host key with synced base product
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/reposync/srv_create_repository.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This feature can cause failures in:
# If the fake-rpm-repo fails to be created:
# - features/init_client/allcli_update_activationkeys.feature
# - features/reposync/srv_sync_fake_channels.feature
# If Fake-Deb-AMD64-Channel fails to be updated with the repository:
# - features/secondary/min_deblike_salt_install_package.feature
# - features/secondary/min_deblike_salt_install_with_staging.feature
Expand Down
49 changes: 49 additions & 0 deletions testsuite/features/reposync/srv_sync_fake_channels.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (c) 2022-2023 SUSE LLC
# Licensed under the terms of the MIT license.

Feature: Prepare fake SUSE channels
In order to have patches and packages to install on clients
As admin
I want to prepare the channels containing those patches and packages

Scenario: Log in as admin user
Given I am authorized for the "Admin" section

Scenario: Add the fake packages child channel to the base product channel
When I follow the left menu "Software > Manage > Channels"
And I follow "Create Channel"
And I enter "Fake-RPM-SUSE-Channel" as "Channel Name"
And I enter "fake-rpm-suse-channel" as "Channel Label"
And I select the parent channel for the "sle_minion" from "Parent Channel"
And I select "x86_64" from "Architecture:"
And I enter "Fake-RPM-SUSE-Channel for testing" as "Channel Summary"
And I enter "Description for Fake-RPM-SUSE-Channel Child Channel." as "Channel Description"
And I click on "Create Channel"
Then I should see a "Channel Fake-RPM-SUSE-Channel created." text

Scenario: Add the repository to the fake packages child channel
When I follow the left menu "Software > Manage > Channels"
And I follow "Fake-RPM-SUSE-Channel"
And I enter "file:///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key" as "GPG key URL"
And I click on "Update Channel"
Then I should see a "Channel Fake-RPM-SUSE-Channel updated" text
When I follow "Repositories" in the content area
And I select the "fake-rpm-repo" repo
And I click on "Save Repositories"
Then I should see a "Fake-RPM-SUSE-Channel repository information was successfully updated" text

Scenario: Synchronize the repository in the fake packages channel
When I enable source package syncing
And I follow the left menu "Software > Manage > Channels"
And I follow "Fake-RPM-SUSE-Channel"
And I follow "Repositories" in the content area
And I follow "Sync"
And I wait at most 60 seconds until I do not see "Repository sync is running." text, refreshing the page
And I click on "Sync Now"
Then I should see a "Repository sync scheduled for Fake-RPM-SUSE-Channel." text
And I wait until the channel "fake-rpm-suse-channel" has been synced
And I disable source package syncing

Scenario: Verify state of Fake-RPM-SUSE-Channel custom channel
Then "orion-dummy-1.1-1.1.x86_64.rpm" package should have been stored
And solver file for "fake-rpm-suse-channel" should reference "orion-dummy-1.1-1.1.x86_64.rpm"
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
- features/core/srv_create_activationkey.feature
- features/core/srv_osimage.feature
- features/core/srv_docker.feature
- features/reposync/srv_sync_fake_channels.feature
## Container features END ###
1 change: 1 addition & 0 deletions testsuite/run_sets/reposync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
- features/reposync/srv_enable_sync_products.feature
- features/reposync/srv_wait_for_reposync.feature
- features/reposync/srv_create_repository.feature
- features/reposync/srv_sync_fake_channels.feature

## Channels and Product synchronization features END ###

0 comments on commit f4f7cca

Please sign in to comment.