depot/third_party/nixpkgs/nixos/tests/crabfit.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

33 lines
702 B
Nix

import ./make-test-python.nix (
{ lib, pkgs, ... }:
{
name = "crabfit";
meta.maintainers = with lib.maintainers; [ ];
nodes = {
machine =
{ pkgs, ... }:
{
services.crabfit = {
enable = true;
frontend.host = "http://127.0.0.1:3001";
api.host = "127.0.0.1:3000";
};
};
};
# TODO: Add a reverse proxy and a dns entry for testing
testScript = ''
machine.wait_for_unit("crabfit-api")
machine.wait_for_unit("crabfit-frontend")
machine.wait_for_open_port(3000)
machine.wait_for_open_port(3001)
machine.succeed("curl -f http://localhost:3001/")
'';
}
)