-
Notifications
You must be signed in to change notification settings - Fork 19
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
Update auto_update_boot_source_vm to use instance types #191
base: main
Are you sure you want to change the base?
Update auto_update_boot_source_vm to use instance types #191
Conversation
Report bugs in Issues The following are automatically added:
Available user actions:
Supported /retest check runs
Supported labels
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D/S test tox -e verify-bugs-are-open
passed: cnv-tests-tox-executor/6073
1b94678
to
91d593f
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D/S test tox -e verify-bugs-are-open
passed: cnv-tests-tox-executor/6152
/build-and-push-container |
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-191 published |
/verified |
@@ -187,10 +187,12 @@ def _get_default_storage_class(sc_list): | |||
# If the DataImportCron uses a different prefix than the DataSource name | |||
# use data_import_cron_prefix in matrix dict to specify new prefix. | |||
auto_update_data_source_matrix = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
templates are still supported. this drops coverage for templates. No?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we extend this for cluster_prefeence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a good idea, but lets try and merge this first before we add an assertion on the used preferences, I don't want to make this PR too big and over extend it's purpose
|
||
LOGGER = logging.getLogger(__name__) | ||
RHEL9_NAME = "rhel9" | ||
|
||
|
||
def assert_os_version_mismatch_in_vm(vm, expected_os): | ||
expected_os_params = re.match(r"(?P<os_name>[a-z]+)(-stream)?(?P<os_ver>[0-9]+)", expected_os).groupdict() | ||
def assert_os_version_mismatch_in_vm(vm, latest_fedora_release_version): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to cover instance types, that is great. But let's not remove coverage for templates till they are removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we cover both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point, but I respectfully disagree that this test is meant to cover templates. Its primary focus is on the Data Import Cron, and while it does use a template, that’s more of a tool rather than the core intent of the test.
In the past, creating a VM from templates was a common practice, and as a result, VirtualMachineForTemplates became the default approach. However, changing the method here does not necessarily imply a loss of coverage. Let me know what you think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test file is called "test_ssp_common_templates_boot_sources.py". I am not in favor of removing template coverage with instance type as of now. When templates are removed, please feel free to remove associated tests. Till then if you want to add coverage for instance type, please add new tests in a separate file.
|
||
LOGGER = logging.getLogger(__name__) | ||
RHEL9_NAME = "rhel9" | ||
|
||
|
||
def assert_os_version_mismatch_in_vm(vm, expected_os): | ||
expected_os_params = re.match(r"(?P<os_name>[a-z]+)(-stream)?(?P<os_ver>[0-9]+)", expected_os).groupdict() | ||
def assert_os_version_mismatch_in_vm(vm, latest_fedora_release_version): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test file is called "test_ssp_common_templates_boot_sources.py". I am not in favor of removing template coverage with instance type as of now. When templates are removed, please feel free to remove associated tests. Till then if you want to add coverage for instance type, please add new tests in a separate file.
Short description:
Use instance types instead of templates to create VM from provided data sources
More details:
Since centos-10/rhel-10 don't have templates we can't add them to the testing matrix, as such we should update VM creation method in Data Source tests
auto_update_data_source_matrix
template_os
fromauto_update_data_source_matrix
auto_update_boot_source_vm
to use instance typesassert_os_version_mismatch_in_vm
to assert:vm guest OS == preference name given by the data source label
matrix_auto_boot_data_import_cron_prefixes
since the matrix no longer hasauto_update_data_source_matrix
What this PR does / why we need it:
Add coverage for centos10/rhel10-beta
Special notes for reviewer:
Next release rhel10-beta naming will be needed to change to rhel-10
jira-ticket:
https://issues.redhat.com/browse/CNV-41859