Skip to content

Commit

Permalink
[6.13.z] Validate testimony for upgrade tests (#12891)
Browse files Browse the repository at this point in the history
Validate testimony for upgrade tests (#12878)

Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 4352c9b)

Co-authored-by: Gaurav Talreja <[email protected]>
  • Loading branch information
Satellite-QE and Gauravtalreja1 authored Oct 12, 2023
1 parent 937e562 commit 515d1c4
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 29 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ test-docstrings: uuid-check
testimony $(TESTIMONY_OPTIONS) validate tests/foreman/ui
testimony $(TESTIMONY_OPTIONS) validate tests/foreman/virtwho
testimony $(TESTIMONY_OPTIONS) validate tests/foreman/maintain
testimony $(TESTIMONY_OPTIONS) validate tests/upgrades

test-robottelo:
$(info "Running robottelo framework unit tests...")
Expand Down
8 changes: 4 additions & 4 deletions tests/upgrades/test_activation_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ def test_pre_create_activation_key(self, activation_key_setup, target_sat):
:steps:
1. Create the activation key.
2. Add subscription in the activation key.
3: Check the subscription id of the activation key and compare it with custom_repos
product id.
3. Check the subscription id of the activation key and compare it with custom_repos
product id.
4. Update the host collection in the activation key.
:parametrized: yes
:expectedresults: Activation key should be created successfully and it's subscription id
should be same with custom repos product id.
should be same with custom repos product id.
"""
ak = activation_key_setup['ak']
org_subscriptions = target_sat.api.Subscription(
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_post_crud_activation_key(self, dependent_scenario_name, target_sat):
3. Delete activation key.
:expectedresults: Activation key's entities should be same after upgrade and activation
key update and delete should work.
key update and delete should work.
"""
pre_test_name = dependent_scenario_name
org = target_sat.api.Organization().search(query={'search': f'name={pre_test_name}_org'})
Expand Down
6 changes: 2 additions & 4 deletions tests/upgrades/test_bookmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_post_create_public_disable_bookmark(self, dependent_scenario_name, targ
2. Remove the bookmark.
:expectedresults: Public disabled bookmarks details for all the system entities
should be unchanged after upgrade.
should be unchanged after upgrade.
:CaseImportance: Critical
"""
Expand Down Expand Up @@ -106,7 +106,6 @@ def test_pre_create_public_enable_bookmark(self, request, target_sat):
:id: preupgrade-93c419db-66b4-4c9a-a82a-a6a68703881f
:Steps:
1. Create public enable bookmarks before the upgrade for all system entities
using available bookmark data.
2. Check the bookmark attribute(controller, name, query public) status
Expand Down Expand Up @@ -142,12 +141,11 @@ def test_post_create_public_enable_bookmark(self, dependent_scenario_name, targe
:id: postupgrade-93c419db-66b4-4c9a-a82a-a6a68703881f
:Steps:
1. Check the bookmark status after post-upgrade.
2. Remove the bookmark.
:expectedresults: Public disabled bookmarks details for all the system entities
should be unchanged after upgrade.
should be unchanged after upgrade.
:CaseImportance: Critical
"""
Expand Down
3 changes: 1 addition & 2 deletions tests/upgrades/test_capsule.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def test_pre_user_scenario_capsule_sync(self, target_sat, default_org, save_test
:expectedresults:
1. The repo/rpm should be synced to satellite
2. Activation key's environment id should be available in the content views environment
id's list
id's list
"""
ak_name = (
settings.upgrade.capsule_ak[settings.upgrade.os]
Expand Down
14 changes: 6 additions & 8 deletions tests/upgrades/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,15 @@ def test_pre_scenario_generate_errata_for_client(
:id: preupgrade-88fd28e6-b4df-46c0-91d6-784859fd1c21
:steps:
1. Create Product and Custom Yum Repo
2. Create custom tools, rhel repos and sync them
3. Create content view and publish it
4. Create activation key and add subscription
5. Register RHEL host to Satellite
7. Generate Errata by installing outdated/older packages
8. Check that errata applicability generated expected errata list for the given client.
6. Generate Errata by installing outdated/older packages
7. Check that errata applicability generated expected errata list for the given client.
:expectedresults:
1. The content host is created
2. errata count, erratum list will be generated to Satellite content host
3. All the expected errata are ready-to-be-applied on the client
Expand Down Expand Up @@ -204,10 +202,10 @@ def test_post_scenario_errata_count_installation(self, target_sat, pre_upgrade_d
1. Recover pre_upgrade data for post_upgrade verification
2. Verify errata count has not changed on Satellite
4. Verify the errata_ids
5. Verify installation of errata is successfull
6. Verify that the errata application updated packages on client
7. Verify that all expected erratas were installed on client.
3. Verify the errata_ids
4. Verify installation of errata is successfull
5. Verify that the errata application updated packages on client
6. Verify that all expected erratas were installed on client.
:expectedresults:
1. errata count and erratum list should same after Satellite upgrade
Expand Down
9 changes: 4 additions & 5 deletions tests/upgrades/test_satellitesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ def test_pre_version_cv_export_import(self, module_org, target_sat, save_test_da
:id: preupgrade-f19e4928-94db-4df6-8ce8-b5e4afe34258
:steps:
1. Create a ContentView
2. Publish and promote the Content View
3. Check the package count of promoted content view.
1. Create a ContentView
2. Publish and promote the Content View
3. Check the package count of promoted content view.
:expectedresults: Before the upgrade, Content view published and promoted, and package
count should be greater than 0.
count should be greater than 0.
"""
product = target_sat.api.Product(organization=module_org).create()
repo = target_sat.api.Repository(
Expand Down
8 changes: 3 additions & 5 deletions tests/upgrades/test_syncplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def test_pre_sync_plan_migration(self, request, target_sat):
3. Assign sync plan to product and sync the repo
:expectedresults: Run sync plan create, get, assign and verify it should pass
"""
org = target_sat.api.Organization(name=f'{request.node.name}_org').create()
sync_plan = target_sat.api.SyncPlan(
Expand Down Expand Up @@ -71,7 +70,7 @@ def test_pre_disabled_sync_plan_logic(self, request, target_sat):
5. Re enable the sync plan
:expectedresults: Sync plan is created and assigned to a product. The associated recurring
logic is cancelled and then the plan is re-enabled so that it gets a new recurring logic.
logic is cancelled and then the plan is re-enabled so that it gets a new recurring logic.
:BZ: 1887511
Expand Down Expand Up @@ -114,8 +113,7 @@ def test_post_sync_plan_migration(self, request, dependent_scenario_name, target
2. Check the all available sync_interval type update with pre-created sync_plan
:expectedresults: After upgrade, the sync plan should remain the same with their all
target_sat.api and sync_interval updated with their all supported sync interval type.
target_sat.api and sync_interval updated with their all supported sync interval type.
"""
pre_test_name = dependent_scenario_name
org = target_sat.api.Organization().search(query={'search': f'name="{pre_test_name}_org"'})[
Expand Down Expand Up @@ -156,7 +154,7 @@ def test_post_disabled_sync_plan_logic(self, request, dependent_scenario_name, t
2. Check the all available sync_interval type update with pre-created sync_plan.
:expectedresults: Update proceedes without any errors. After upgrade, the sync plan
should remain the same with all entities
should remain the same with all entities
:BZ: 1887511
Expand Down
2 changes: 1 addition & 1 deletion tests/upgrades/test_usergroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_post_verify_user_group_membership(
2. Update ldap auth.
:expectedresults: After upgrade, user group membership should remain the same and LDAP
auth update should work.
auth update should work.
"""
ad_data = ad_data()
user_group = target_sat.api.UserGroup().search(
Expand Down

0 comments on commit 515d1c4

Please sign in to comment.