-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
test: Adjust stratis pool stop
to stratis-cli 3.6.0
#19525
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,12 +36,18 @@ class TestStorageStratis(storagelib.StorageCase): | |
|
||
self.stratis_v2 = self.image.startswith("rhel-8") or self.image == "centos-8-stream" | ||
|
||
# the CLI changed in an incompatible way in Fedora 40 | ||
if '--name' in exe("stratis pool stop --help"): | ||
self.stop_type_opt = "--name" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you could turn this info There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, can do. I initially even had this, then changed it to this because I thought "oh, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On second thought, it may happen to other commands, this makes all PRs red, I actually find it nicer to read most of the command to see what's going on, and there's still so much other stuff to pilot. So I'll be so cheeky and land it as-is. |
||
else: | ||
self.stop_type_opt = "" | ||
|
||
self.addCleanup(exe, | ||
"stratis report | jq -r '.pools[] | .name' |" | ||
"xargs -n1 --no-run-if-empty stratis pool destroy") | ||
self.addCleanup(exe, | ||
"stratis report | jq -r '.pools[] | .name' |" | ||
"xargs -n1 --no-run-if-empty stratis pool stop") | ||
f"xargs -n1 --no-run-if-empty stratis pool stop {self.stop_type_opt}") | ||
|
||
def testBasic(self): | ||
m = self.machine | ||
|
@@ -87,7 +93,7 @@ class TestStorageStratis(storagelib.StorageCase): | |
if not self.stratis_v2: | ||
# Stop the pool (only works with Stratis 3) | ||
pool_uuid = m.execute("stratis --unhyphenated-uuids pool list --name pool0 | grep ^UUID | cut -d' ' -f2").strip() | ||
m.execute("stratis pool stop pool0") | ||
m.execute(f"stratis pool stop {self.stop_type_opt} pool0") | ||
b.wait_in_text(f'.sidepanel-row:contains("{pool_uuid}")', "Stopped Stratis pool") | ||
|
||
# Start it | ||
|
@@ -860,7 +866,7 @@ class TestStorageStratisNBDE(packagelib.PackageCase, storagelib.StorageCase): | |
|
||
# Stop the pool and start it again. This should not ask | ||
# for the passphrase (since there isn't any) | ||
m.execute("stratis pool stop pool0") | ||
m.execute(f"stratis pool stop {self.stop_type_opt} pool0") | ||
b.wait_in_text('#detail-header', "Stopped Stratis pool") | ||
tang_m.execute("systemctl stop tangd.socket") | ||
b.click('#detail-header button:contains(Start)') | ||
|
@@ -882,7 +888,7 @@ class TestStorageStratisNBDE(packagelib.PackageCase, storagelib.StorageCase): | |
self.dialog({'passphrase': "foodeeboodeebar", | ||
'passphrase2': "foodeeboodeebar"}) | ||
b.wait_visible('#detail-header .pf-v5-c-description-list__group:contains(Keyserver) button:contains(Remove):not([aria-disabled=true])') | ||
m.execute("stratis pool stop pool0") | ||
m.execute(f"stratis pool stop {self.stop_type_opt} pool0") | ||
tang_m.execute("systemctl stop tangd.socket") | ||
b.click('#detail-header button:contains(Start)') | ||
self.dialog_wait_open() | ||
|
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.
At first my eyes popped out of my head, but then I said "oh, it's only a test".