nixos/tests/magnetico: port to python
This commit is contained in:
parent
6823199dbe
commit
f6a8eb2d00
@ -148,6 +148,7 @@ in
|
|||||||
loki = handleTest ./loki.nix {};
|
loki = handleTest ./loki.nix {};
|
||||||
#logstash = handleTest ./logstash.nix {};
|
#logstash = handleTest ./logstash.nix {};
|
||||||
lorri = handleTest ./lorri/default.nix {};
|
lorri = handleTest ./lorri/default.nix {};
|
||||||
|
magnetico = handleTest ./magnetico.nix {};
|
||||||
mailcatcher = handleTest ./mailcatcher.nix {};
|
mailcatcher = handleTest ./mailcatcher.nix {};
|
||||||
mathics = handleTest ./mathics.nix {};
|
mathics = handleTest ./mathics.nix {};
|
||||||
matomo = handleTest ./matomo.nix {};
|
matomo = handleTest ./matomo.nix {};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} :
|
import ./make-test-python.nix ({ pkgs, ...} :
|
||||||
|
|
||||||
let
|
let
|
||||||
port = 8081;
|
port = 8081;
|
||||||
@ -24,13 +24,17 @@ in
|
|||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
startAll;
|
start_all()
|
||||||
$machine->waitForUnit("magneticod");
|
machine.wait_for_unit("magneticod")
|
||||||
$machine->waitForUnit("magneticow");
|
machine.wait_for_unit("magneticow")
|
||||||
$machine->succeed("${pkgs.curl}/bin/curl ".
|
machine.succeed(
|
||||||
"-u user:password http://localhost:${toString port}");
|
"${pkgs.curl}/bin/curl "
|
||||||
$machine->succeed("${pkgs.curl}/bin/curl ".
|
+ "-u user:password http://localhost:${toString port}"
|
||||||
"-u user:wrongpwd http://localhost:${toString port}") =~ "Unauthorised." or die;
|
)
|
||||||
$machine->shutdown();
|
assert "Unauthorised." in machine.succeed(
|
||||||
|
"${pkgs.curl}/bin/curl "
|
||||||
|
+ "-u user:wrongpwd http://localhost:${toString port}"
|
||||||
|
)
|
||||||
|
machine.shutdown()
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user