depot/third_party/nixpkgs/nixos/tests/private-gpt.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

27 lines
486 B
Nix

import ./make-test-python.nix ({ pkgs, lib, ... }:
let
mainPort = "8001";
in
{
name = "private-gpt";
meta = with lib.maintainers; {
maintainers = [ drupol ];
};
nodes = {
machine = { ... }: {
services.private-gpt = {
enable = true;
};
};
};
testScript = ''
machine.start()
machine.wait_for_unit("private-gpt.service")
machine.wait_for_open_port(${mainPort})
machine.succeed("curl http://127.0.0.1:${mainPort}")
'';
})