Skip to content

Commit

Permalink
chore(tests): Test state no config/change cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
vifino committed Feb 13, 2024
1 parent 9690716 commit 2b986f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/loop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
node.succeed("nvmet state restore /root/state.yml")
node.succeed("test -d /sys/kernel/config/nvmet/subsystems/${subnqn}/namespaces/1")
node.succeed("test -d /sys/kernel/config/nvmet/ports/1")
assert "no changes" in node.succeed("nvmet state restore /root/state.yml")
node.succeed("nvmet state save /root/state-after.yml")
node.succeed("test -f /root/state-after.yml")
Expand All @@ -73,6 +74,7 @@
node.succeed("nvmet port remove-subsystem 1 ${subnqn}")
assert "${subnqn}" not in node.succeed("nvmet port list-subsystems 1")
node.fail("test -e /sys/kernel/config/nvmet/ports/1/subsystems/${subnqn}")
assert "no config" in node.succeed("nvmet state clear")
node.succeed("nvmet subsystem remove ${subnqn}")
node.fail("test -e /sys/kernel/config/nvmet/subsystems/${subnqn}")
Expand Down
2 changes: 2 additions & 0 deletions tests/rdma.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@
target.succeed("nvmet state clear")
target.fail("test -e /sys/kernel/config/nvmet/subsystems/${subnqn}")
target.fail("test -e /sys/kernel/config/nvmet/ports/1")
assert "no config" in target.succeed("nvmet state clear")
target.succeed("nvmet state restore /root/state.yml")
target.succeed("test -d /sys/kernel/config/nvmet/subsystems/${subnqn}/namespaces/1")
target.succeed("test -d /sys/kernel/config/nvmet/ports/1")
assert "no changes" in target.succeed("nvmet state restore /root/state.yml")
target.succeed("nvmet state save /root/state-after.yml")
target.succeed("test -f /root/state-after.yml")
Expand Down
2 changes: 2 additions & 0 deletions tests/tcp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@
target.succeed("nvmet state clear")
target.fail("test -e /sys/kernel/config/nvmet/subsystems/${subnqn}")
target.fail("test -e /sys/kernel/config/nvmet/ports/1")
assert "no config" in target.succeed("nvmet state clear")
target.succeed("nvmet state restore /root/state.yml")
target.succeed("test -d /sys/kernel/config/nvmet/subsystems/${subnqn}/namespaces/1")
target.succeed("test -d /sys/kernel/config/nvmet/ports/1")
assert "no changes" in target.succeed("nvmet state restore /root/state.yml")
target.succeed("nvmet state save /root/state-after.yml")
target.succeed("test -f /root/state-after.yml")
Expand Down

0 comments on commit 2b986f0

Please sign in to comment.