mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
nixos/tests/healthchecks: update test for auto user change in healthchecks-manage
This commit is contained in:
parent
887462db03
commit
3c4c38a799
@ -33,10 +33,10 @@ import ../make-test-python.nix ({ lib, pkgs, ... }: {
|
||||
)
|
||||
|
||||
with subtest("Manage script works"):
|
||||
# Should fail if not called by healthchecks user
|
||||
machine.fail("echo 'print(\"foo\")' | healthchecks-manage help")
|
||||
|
||||
# "shell" sucommand should succeed, needs python in PATH.
|
||||
assert "foo\n" == machine.succeed("echo 'print(\"foo\")' | sudo -u healthchecks healthchecks-manage shell")
|
||||
|
||||
# Shouldn't fail if not called by healthchecks user
|
||||
assert "foo\n" == machine.succeed("echo 'print(\"foo\")' | healthchecks-manage shell")
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user