nixosTests.go-camo: handleTest -> runTest
This commit is contained in:
parent
a698ac1214
commit
ffbaf47a72
@ -605,7 +605,7 @@ in
|
|||||||
gns3-server = runTest ./gns3-server.nix;
|
gns3-server = runTest ./gns3-server.nix;
|
||||||
gnupg = runTest ./gnupg.nix;
|
gnupg = runTest ./gnupg.nix;
|
||||||
goatcounter = runTest ./goatcounter.nix;
|
goatcounter = runTest ./goatcounter.nix;
|
||||||
go-camo = handleTest ./go-camo.nix { };
|
go-camo = runTest ./go-camo.nix;
|
||||||
go-neb = runTest ./go-neb.nix;
|
go-neb = runTest ./go-neb.nix;
|
||||||
gobgpd = runTest ./gobgpd.nix;
|
gobgpd = runTest ./gobgpd.nix;
|
||||||
gocd-agent = runTest ./gocd-agent.nix;
|
gocd-agent = runTest ./gocd-agent.nix;
|
||||||
|
@ -1,36 +1,26 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
key_val = "12345678";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
system ? builtins.currentSystem,
|
name = "go-camo-file-key";
|
||||||
config ? { },
|
meta = {
|
||||||
pkgs ? import ../.. { inherit system config; },
|
maintainers = [ lib.maintainers.viraptor ];
|
||||||
}:
|
};
|
||||||
|
|
||||||
with import ../lib/testing-python.nix { inherit system pkgs; };
|
nodes.machine =
|
||||||
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
gocamo_file_key =
|
services.go-camo = {
|
||||||
let
|
enable = true;
|
||||||
key_val = "12345678";
|
keyFile = pkgs.writeText "foo" key_val;
|
||||||
in
|
|
||||||
makeTest {
|
|
||||||
name = "go-camo-file-key";
|
|
||||||
meta = {
|
|
||||||
maintainers = [ pkgs.lib.maintainers.viraptor ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes.machine =
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.go-camo = {
|
|
||||||
enable = true;
|
|
||||||
keyFile = pkgs.writeText "foo" key_val;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# go-camo responds to http requests
|
|
||||||
testScript = ''
|
|
||||||
machine.wait_for_unit("go-camo.service")
|
|
||||||
machine.wait_for_open_port(8080)
|
|
||||||
machine.succeed("curl http://localhost:8080")
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# go-camo responds to http requests
|
||||||
|
testScript = ''
|
||||||
|
machine.wait_for_unit("go-camo.service")
|
||||||
|
machine.wait_for_open_port(8080)
|
||||||
|
machine.succeed("curl http://localhost:8080")
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user