diff options
author | Nick Cao <nickcao@nichi.co> | 2022-09-12 23:49:52 +0800 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2022-09-12 23:49:52 +0800 |
commit | 6ec928d73d0580692e75c54c79a0f5a69c1edcf2 (patch) | |
tree | e7225ef1cc9adbb25d5f5d66bb00ba8c70b8ce3d /nixos/tests/stratis | |
parent | 7398c337c9ce56c16bb93756f3e2f763058a9efa (diff) |
nixos/stratis: wait for devices to appear in tests
Diffstat (limited to 'nixos/tests/stratis')
-rw-r--r-- | nixos/tests/stratis/simple.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/tests/stratis/simple.nix b/nixos/tests/stratis/simple.nix index 0878cb12d967a..7357d71fc52ba 100644 --- a/nixos/tests/stratis/simple.nix +++ b/nixos/tests/stratis/simple.nix @@ -23,11 +23,13 @@ import ../make-test-python.nix ({ pkgs, ... }: machine.succeed("stratis filesystem rename testpool testfs0 testfs1") # test snapshot machine.succeed("mkdir -p /mnt/testfs1 /mnt/testfs2") + machine.wait_for_file("/dev/stratis/testpool/testfs1") machine.succeed("mount /dev/stratis/testpool/testfs1 /mnt/testfs1") machine.succeed("echo test0 > /mnt/testfs1/test0") machine.succeed("echo test1 > /mnt/testfs1/test1") machine.succeed("stratis filesystem snapshot testpool testfs1 testfs2") machine.succeed("echo test2 > /mnt/testfs1/test1") + machine.wait_for_file("/dev/stratis/testpool/testfs2") machine.succeed("mount /dev/stratis/testpool/testfs2 /mnt/testfs2") assert "test0" in machine.succeed("cat /mnt/testfs1/test0") assert "test0" in machine.succeed("cat /mnt/testfs2/test0") |