nixosTests.corteza: init

This commit is contained in:
Sizhe Zhao 2025-06-24 18:54:39 +08:00
parent c721b7dfe9
commit 354d9d7986
No known key found for this signature in database
GPG Key ID: ED1807251A7DA08F
3 changed files with 26 additions and 0 deletions

View File

@ -347,6 +347,7 @@ in
containers-unified-hierarchy = runTest ./containers-unified-hierarchy.nix;
convos = runTest ./convos.nix;
corerad = handleTest ./corerad.nix { };
corteza = runTest ./corteza.nix;
cosmic = runTest {
imports = [ ./cosmic.nix ];
_module.args.testName = "cosmic";

23
nixos/tests/corteza.nix Normal file
View File

@ -0,0 +1,23 @@
{ lib, ... }:
let
port = 8080;
in
{
name = "corteza";
meta.maintainers = [ lib.teams.ngi.members ];
nodes.machine = {
services.corteza = {
enable = true;
inherit port;
};
};
testScript = ''
machine.start()
machine.wait_for_unit("default.target")
machine.wait_until_succeeds("curl http://localhost:${toString port}/auth/login | grep button-login")
'';
}

View File

@ -5,6 +5,7 @@
callPackage,
fetchFromGitHub,
lib,
nixosTests,
stdenvNoCC,
}:
@ -161,6 +162,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
passthru = {
srcs = { inherit corteza-server corteza-webapp; };
tests = { inherit (nixosTests) corteza; };
};
inherit (corteza-server) meta;