nixos/tests/magnetico: check for different web port
This commit is contained in:
parent
dda2f6415f
commit
6823199dbe
@ -1,4 +1,9 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} :
|
||||||
|
|
||||||
|
let
|
||||||
|
port = 8081;
|
||||||
|
in
|
||||||
|
{
|
||||||
name = "magnetico";
|
name = "magnetico";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ rnhmjoj ];
|
maintainers = [ rnhmjoj ];
|
||||||
@ -12,6 +17,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
services.magnetico = {
|
services.magnetico = {
|
||||||
enable = true;
|
enable = true;
|
||||||
crawler.port = 9000;
|
crawler.port = 9000;
|
||||||
|
web.port = port;
|
||||||
web.credentials.user = "$2y$12$P88ZF6soFthiiAeXnz64aOWDsY3Dw7Yw8fZ6GtiqFNjknD70zDmNe";
|
web.credentials.user = "$2y$12$P88ZF6soFthiiAeXnz64aOWDsY3Dw7Yw8fZ6GtiqFNjknD70zDmNe";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -21,8 +27,10 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
startAll;
|
startAll;
|
||||||
$machine->waitForUnit("magneticod");
|
$machine->waitForUnit("magneticod");
|
||||||
$machine->waitForUnit("magneticow");
|
$machine->waitForUnit("magneticow");
|
||||||
$machine->succeed("${pkgs.curl}/bin/curl -u user:password http://localhost:8080");
|
$machine->succeed("${pkgs.curl}/bin/curl ".
|
||||||
$machine->succeed("${pkgs.curl}/bin/curl -u user:wrongpwd http://localhost:8080") =~ "Unauthorised." or die;
|
"-u user:password http://localhost:${toString port}");
|
||||||
|
$machine->succeed("${pkgs.curl}/bin/curl ".
|
||||||
|
"-u user:wrongpwd http://localhost:${toString port}") =~ "Unauthorised." or die;
|
||||||
$machine->shutdown();
|
$machine->shutdown();
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user