mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
nixosTests.magnetico: wait for open port and make curl actually fail
This commit is contained in:
parent
1aa888ba53
commit
76aeb20d91
|
@ -27,12 +27,13 @@ in
|
|||
start_all()
|
||||
machine.wait_for_unit("magneticod")
|
||||
machine.wait_for_unit("magneticow")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
machine.succeed(
|
||||
"${pkgs.curl}/bin/curl "
|
||||
"${pkgs.curl}/bin/curl --fail "
|
||||
+ "-u user:password http://localhost:${toString port}"
|
||||
)
|
||||
assert "Unauthorised." in machine.succeed(
|
||||
"${pkgs.curl}/bin/curl "
|
||||
machine.fail(
|
||||
"${pkgs.curl}/bin/curl --fail "
|
||||
+ "-u user:wrongpwd http://localhost:${toString port}"
|
||||
)
|
||||
machine.shutdown()
|
||||
|
|
Loading…
Reference in a new issue