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()
|
start_all()
|
||||||
machine.wait_for_unit("magneticod")
|
machine.wait_for_unit("magneticod")
|
||||||
machine.wait_for_unit("magneticow")
|
machine.wait_for_unit("magneticow")
|
||||||
|
machine.wait_for_open_port(${toString port})
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"${pkgs.curl}/bin/curl "
|
"${pkgs.curl}/bin/curl --fail "
|
||||||
+ "-u user:password http://localhost:${toString port}"
|
+ "-u user:password http://localhost:${toString port}"
|
||||||
)
|
)
|
||||||
assert "Unauthorised." in machine.succeed(
|
machine.fail(
|
||||||
"${pkgs.curl}/bin/curl "
|
"${pkgs.curl}/bin/curl --fail "
|
||||||
+ "-u user:wrongpwd http://localhost:${toString port}"
|
+ "-u user:wrongpwd http://localhost:${toString port}"
|
||||||
)
|
)
|
||||||
machine.shutdown()
|
machine.shutdown()
|
||||||
|
|
Loading…
Reference in New Issue