2022-06-25 16:20:59 +01:00
|
|
|
{
|
|
|
|
system ? builtins.currentSystem,
|
|
|
|
config ? { },
|
|
|
|
pkgs ? import ../.. { inherit system config; },
|
|
|
|
}:
|
|
|
|
|
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
|
|
|
|
|
|
|
{
|
|
|
|
gocamo_file_key =
|
|
|
|
let
|
|
|
|
key_val = "12345678";
|
|
|
|
in
|
|
|
|
makeTest {
|
|
|
|
name = "go-camo-file-key";
|
|
|
|
meta = {
|
|
|
|
maintainers = [ pkgs.lib.maintainers.viraptor ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes.machine =
|
|
|
|
{ config, pkgs, ... }:
|
2024-12-10 19:26:33 +00:00
|
|
|
{
|
2022-06-25 16:20:59 +01:00
|
|
|
services.go-camo = {
|
|
|
|
enable = true;
|
|
|
|
keyFile = pkgs.writeText "foo" key_val;
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-06-25 16:20:59 +01:00
|
|
|
# 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")
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|