Skip to content

Conversation

ydirson
Copy link
Contributor

@ydirson ydirson commented Jun 16, 2025

First version is only driven by the TestLinstorSRCreateDestroy class of tests. I propose fixes for the problems I see with obvious solutions (and some changes that are merely improvements), and insert FIXME's in the places I see as potentially problematic.

ydirson added 5 commits June 16, 2025 18:11
This particular package will be removed by the `saved_yum_state` fixture.
If removing this code breaks other tests, then it is likely the latter that
need fixing.

Signed-off-by: Yann Dirson <[email protected]>
"assert" here will show the test as FAILED, where in fact the test was
not run.  This makes it a fixture, so at least the test is just
marked ERROR when that happens.

FIXME: python-linstor still sounds a strange package to test for
@@ -43,17 +43,30 @@ def lvm_disks(host, sr_disks_for_all_hosts, provisioning_type):

@pytest.fixture(scope="package")
def storage_pool_name(provisioning_type):
# FIXME: this needs an explanation
Copy link
Contributor

Choose a reason for hiding this comment

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

This is to dynamically handle the provisioning_type used for building GROUP_NAME. Please see comment for def provisioning_type for more.

return GROUP_NAME if provisioning_type == "thick" else STORAGE_POOL_NAME

# FIXME why having this feature of session scope? Shouldn't it make
# it impossible to run both thin and thick tests in the same session?
Copy link
Contributor

Choose a reason for hiding this comment

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

Since all linstor tests were going to be repeated with just one change of SR type, pytest params technique was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants