Skip to content

Commit

Permalink
test: Remove mounting race from TestStorageBtrfs.testBasic
Browse files Browse the repository at this point in the history
  • Loading branch information
mvollmer authored and martinpitt committed Feb 19, 2024
1 parent d8aaec8 commit 8f15cb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/storaged/block/format-dialog.jsx
Expand Up @@ -290,7 +290,7 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended,
let [, old_dir, old_opts] = get_fstab_config(block, true,
content_block?.IdType == "btrfs"
? { pathname: "/", id: 5 }
: null);
: undefined);
if (old_opts == undefined)
old_opts = initial_mount_options(client, block);

Expand Down
5 changes: 3 additions & 2 deletions test/verify/check-storage-btrfs
Expand Up @@ -109,8 +109,9 @@ class TestStorageBtrfs(storagelib.StorageCase):
b.wait_visible(self.card_row("Storage", name="nonfstab"))

# Format the btrfs device
self.click_dropdown(self.card_row("Storage", name="sda"), "Format")
self.dialog_wait_open()
# The mount of /run/basement might take some time to be recognized by Cockpit
self.dialog_open_with_retry(lambda: self.click_dropdown(self.card_row("Storage", name="sda"), "Format"),
lambda: "/run/basement" in b.text("#dialog"))
self.checkTeardownAction(1, "Device", dev_1)
self.checkTeardownAction(1, "Location", "/run/basement")
self.checkTeardownAction(1, "Action", "unmount, format")
Expand Down

0 comments on commit 8f15cb9

Please sign in to comment.