nixosTests.alloy: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-13 22:57:18 +01:00
parent 1f264807a9
commit 498ecc0604
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 29 additions and 31 deletions

View file

@ -159,7 +159,7 @@ in {
akkoma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix {};
akkoma-confined = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix { confined = true; };
alice-lg = runTest ./alice-lg.nix;
alloy = handleTest ./alloy.nix {};
alloy = runTest ./alloy.nix;
allTerminfo = handleTest ./all-terminfo.nix {};
alps = handleTest ./alps.nix {};
amazon-cloudwatch-agent = handleTest ./amazon-cloudwatch-agent.nix {};

View file

@ -1,37 +1,35 @@
import ./make-test-python.nix (
{ lib, pkgs, ... }:
{ lib, ... }:
let
nodes = {
machine = {
services.alloy = {
enable = true;
};
environment.etc."alloy/config.alloy".text = "";
let
nodes = {
machine = {
services.alloy = {
enable = true;
};
environment.etc."alloy/config.alloy".text = "";
};
in
{
name = "alloy";
};
in
{
name = "alloy";
meta = with lib.maintainers; {
maintainers = [
flokli
hbjydev
];
};
meta = with lib.maintainers; {
maintainers = [
flokli
hbjydev
];
};
inherit nodes;
inherit nodes;
testScript = ''
start_all()
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()
'';
}
)
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()
'';
}