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

[6.15.z] [POC] New-Style Upgrade Tests #16765

Open
wants to merge 2 commits into
base: 6.15.z
Choose a base branch
from

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #14111

SharedResource:

  • Added the ability to validate the result of a given action function via an action_validator function.
  • Made an improvement to exiting under error conditions that improved tracking file cleanup.

upgrades/conftest:

  • Removed the requirement for all upgrade tests to be marked as pre/post
  • Introduced fixtures that coordinate checkout/checkin actions between multiple xdist workers.
  • Introduced a fixture that performs an upgrade on a target satellite
  • Introduced a fixture that is used for two test conversions in different modules.

test conversions:

  • test_cv_upgrade_scenario and test_scenario_custom_repo_check converted
  • pre-upgrade tests are now pre-upgrade fixtures that perform setup and yield their data in Box objects instead of saving to disk
  • post-upgrade tests can now directly access the setup objects by inheriting the pre-upgrade fixture results

settings:

  • Added SATELLITE_DEPLOY_WORKFLOW and SATELLITE_UPGRADE_JOB_TEMPLATE to upgrade.yaml

* [POC] New-Style Upgrade Tests

SharedResource:
- Added the ability to validate the result of a given action function via an action_validator function.
- Made an improvement to exiting under error conditions that improved
  tracking file cleanup.

New directory for new-style upgrades located at tests/new_upgrades. This
will help to keep changes isolated from the existing upgrade tests.

new_upgrades/conftest:
- Removed the requirement for all upgrade tests to be marked as pre/post
- Introduced fixtures that coordinate checkout/checkin actions between
  multiple xdist workers.
- Introduced a fixture that performs an upgrade on a target satellite
- Introduced a fixture that is used for two test conversions in
  different modules.

test conversions:
- test_cv_upgrade_scenario and test_scenario_custom_repo_check converted
- pre-upgrade tests are now pre-upgrade fixtures that perform setup and
  yield their data in Box objects instead of saving to disk
- post-upgrade tests can now directly access the setup objects by
  inheriting the pre-upgrade fixture results

* Get test_cv_upgrade_scenario into passing state

* Get test_scenario_custom_repo_check into passing state

* Revert hard-coded setting in conftest

---------

Co-authored-by: synkd <[email protected]>
Co-authored-by: synkd <[email protected]>
(cherry picked from commit e345285)
@Satellite-QE Satellite-QE added the 6.15.z Introduced in or relating directly to Satellite 6.15 label Oct 24, 2024
@Satellite-QE Satellite-QE requested a review from a team as a code owner October 24, 2024 17:08
@Satellite-QE Satellite-QE added Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Oct 24, 2024
@Satellite-QE Satellite-QE requested a review from a team as a code owner October 24, 2024 17:08
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/new_upgrades/test_repository.py::test_scenario_custom_repo_check
env:
BROKER_SSH_BACKEND: hussh

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 9148
Build Status: UNSTABLE
PRT Comment: pytest tests/new_upgrades/test_repository.py::test_scenario_custom_repo_check --external-logging
Test Result : ================== 16 warnings, 1 error in 2356.04s (0:39:16) ==================

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Oct 24, 2024
@lhellebr
Copy link
Contributor

lhellebr commented Nov 4, 2024

failed on setup with "robottelo.utils.shared_resource.SharedResourceError: Main worker failed during action"
dynaconf.vendor.box.exceptions.BoxKeyError: "'DynaBox' object has no attribute 'SATELLITE_UPGRADE_JOB_TEMPLATE'"

Rerunning once again but this looks like config issue.

@lhellebr
Copy link
Contributor

lhellebr commented Nov 4, 2024

trigger: test-robottelo
pytest: tests/new_upgrades/test_repository.py::test_scenario_custom_repo_check
env:
  BROKER_SSH_BACKEND: hussh

@synkd
Copy link
Contributor

synkd commented Nov 5, 2024

trigger: test-robottelo
pytest: tests/new_upgrades/ -k "test_scenario_custom_repo_check or test_cv_upgrade_scenario"
env:
BROKER_SSH_BACKEND: hussh

@synkd
Copy link
Contributor

synkd commented Nov 5, 2024

trigger: test-robottelo
pytest: tests/new_upgrades/ -k "test_scenario_custom_repo_check or test_cv_upgrade_scenario"
env:
BROKER_SSH_BACKEND: hussh

1 similar comment
@synkd
Copy link
Contributor

synkd commented Nov 5, 2024

trigger: test-robottelo
pytest: tests/new_upgrades/ -k "test_scenario_custom_repo_check or test_cv_upgrade_scenario"
env:
BROKER_SSH_BACKEND: hussh

@synkd
Copy link
Contributor

synkd commented Nov 5, 2024

PRT run #9270 is passing for this PR.

@synkd synkd added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants