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

Add StratisCertify tests for snapshot revert #281

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

bgurney-rh
Copy link
Member

Related: #280

@bgurney-rh bgurney-rh self-assigned this Aug 30, 2024
@bgurney-rh
Copy link
Member Author

The cancel-revert test seems like the only test that I can add right now, as the others would have remnants that clean_up() can't handle right now:

Traceback (most recent call last):
- File "testlib/infra.py", line 126, in clean_up
    f'remnant pools: {", ".join(name for name in remnant_pools)}'
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, tuple found

...and I had to manually run "stratis fs cancel-revert" for the remnant filesystem snapshot.

@mulkieran
Copy link
Member

We'll need to augment the cleanup method with a step to unset all merge fields before we can proceed with the stratis-cli tests.

@bgurney-rh bgurney-rh force-pushed the test-snapshot-revert branch 2 times, most recently from 358dc63 to 6a102c0 Compare September 5, 2024 21:37
@bgurney-rh
Copy link
Member Author

I found a way to get the clean_up() method to run, but it took some rework. Re-ordered commits to have this rework done first, before adding the first test.

@bgurney-rh
Copy link
Member Author

Not quite working yet; for some reason, the clean_up() method is not setting "merge" to "false" on the test filesystem created as a result of the "stratis fs snapshot" command.

@bgurney-rh
Copy link
Member Author

Rebasing, putting all of the testlib additions/fixes in the first commit.

@bgurney-rh bgurney-rh marked this pull request as ready for review September 9, 2024 20:38
Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

I have just one requested change. You might as well go on and add a stratis_cert.py test as well and then this should be done.

testlib/infra.py Outdated Show resolved Hide resolved
@mulkieran
Copy link
Member

Looks good

@bgurney-rh
Copy link
Member Author

Rebased, to squash clean_up(): destructure MergeScheduled unset check into the main commit for clean_up() changes.

Also refine the StratisDbus.fs_list() method to return the object path,
which is used to unset the MergeScheduled field for filesystems being
torn down after a test.

Also, rename StratisDbus.pool_set_property to set_property

Signed-off-by: Bryan Gurney <[email protected]>
@bgurney-rh
Copy link
Member Author

Rebased.

@mulkieran mulkieran merged commit a7e03b4 into stratis-storage:master Oct 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants