mirror of
https://github.com/ryantm/agenix.git
synced 2024-12-22 15:48:30 +03:00
Add wait for file write before assertion
This commit is contained in:
parent
acbc2e53b6
commit
a5725baf25
1 changed files with 2 additions and 1 deletions
|
@ -93,9 +93,10 @@ pkgs.nixosTest {
|
|||
system1.wait_for_file("/tmp/1")
|
||||
assert "${user}" in system1.succeed("cat /tmp/1")
|
||||
system1.send_chars("cat /run/user/$(id -u)/agenix/secret2 > /tmp/2\n")
|
||||
system1.send_chars("cat /run/user/$(id -u)/agenix/armored-secret > /tmp/3\n")
|
||||
system1.wait_for_file("/tmp/2")
|
||||
assert "${secret2}" in system1.succeed("cat /tmp/2")
|
||||
system1.send_chars("cat /run/user/$(id -u)/agenix/armored-secret > /tmp/3\n")
|
||||
system1.wait_for_file("/tmp/3")
|
||||
assert "${armored-secret}" in system1.succeed("cat /tmp/3")
|
||||
|
||||
userDo = lambda input : f"sudo -u user1 -- bash -c 'set -eou pipefail; cd /tmp/secrets; {input}'"
|
||||
|
|
Loading…
Reference in a new issue