mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
c12da48755
This adds a VM test, starting up Grafana Alloy and ensuring it comes up healthy.
33 lines
599 B
Nix
33 lines
599 B
Nix
import ./make-test-python.nix ({ lib, pkgs, ... }:
|
|
|
|
let
|
|
nodes = {
|
|
machine = {
|
|
services.alloy = {
|
|
enable = true;
|
|
};
|
|
environment.etc."alloy/config.alloy".text = "";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
name = "alloy";
|
|
|
|
meta = with lib.maintainers; {
|
|
maintainers = [ flokli ];
|
|
};
|
|
|
|
inherit nodes;
|
|
|
|
testScript = ''
|
|
start_all()
|
|
|
|
machine.wait_for_unit("alloy.service")
|
|
machine.wait_for_open_port(12345)
|
|
machine.succeed(
|
|
"curl -sSfN http://127.0.0.1:12345/-/healthy"
|
|
)
|
|
machine.shutdown()
|
|
'';
|
|
})
|