remove unused acme node for data model tests

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
Kiara Grouwstra 2025-10-10 22:30:54 +02:00
parent 82d6059158
commit 5419e582d7
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
7 changed files with 36 additions and 39 deletions

View file

@ -80,21 +80,29 @@ in
acmeNodeIP = config.nodes.acme.networking.primaryIPAddress; acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
nodes = nodes = lib.mkMerge [
{
deployer = lib.mkMerge [
{ {
deployer = {
imports = [ ./deployerNode.nix ]; imports = [ ./deployerNode.nix ];
_module.args = { inherit inputs sources; }; _module.args = { inherit inputs sources; };
enableAcme = config.enableAcme; enableAcme = config.enableAcme;
acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
};
} }
(lib.mkIf config.enableAcme {
// acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
security.acme = {
( acceptTerms = true;
if config.enableAcme then defaults.email = "test@test.com";
{ defaults.server = "https://acme.test/dir";
};
security.pki.certificateFiles = [
(import "${inputs.nixpkgs}/nixos/tests/common/acme/server/snakeoil-certs.nix").ca.cert
];
networking.extraHosts = "${config.acmeNodeIP} acme.test";
})
];
}
(lib.mkIf config.enableAcme {
acme = { acme = {
## FIXME: This makes `nodes.acme` into a local resolver. Maybe this will ## FIXME: This makes `nodes.acme` into a local resolver. Maybe this will
## break things once we play with DNS? ## break things once we play with DNS?
@ -102,19 +110,14 @@ in
## We aren't testing ACME - we just want certificates. ## We aren't testing ACME - we just want certificates.
systemd.services.pebble.environment.PEBBLE_VA_ALWAYS_VALID = "1"; systemd.services.pebble.environment.PEBBLE_VA_ALWAYS_VALID = "1";
}; };
} })
else (genAttrs config.targetMachines (_: {
{ }
)
//
genAttrs config.targetMachines (_: {
imports = [ ./targetNode.nix ]; imports = [ ./targetNode.nix ];
_module.args = { inherit inputs sources; }; _module.args = { inherit inputs sources; };
enableAcme = config.enableAcme; enableAcme = config.enableAcme;
acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null; acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null;
}); }))
];
testScript = '' testScript = ''
${forConcat (attrNames config.nodes) (n: '' ${forConcat (attrNames config.nodes) (n: ''

View file

@ -4,6 +4,5 @@
]; ];
pathToRoot = ../../..; pathToRoot = ../../..;
pathFromRoot = ./.; pathFromRoot = ./.;
enableAcme = true;
useFlake = true; useFlake = true;
} }

View file

@ -16,7 +16,6 @@ runNixOSTest {
targetMachines targetMachines
pathToRoot pathToRoot
pathFromRoot pathFromRoot
enableAcme
useFlake useFlake
; ;
} }

View file

@ -8,5 +8,4 @@
name = "root"; name = "root";
}; };
pathFromRoot = "/deployment/check/data-model-ssh"; pathFromRoot = "/deployment/check/data-model-ssh";
enableAcme = true;
} }

View file

@ -16,6 +16,5 @@ runNixOSTest {
targetMachines targetMachines
pathToRoot pathToRoot
pathFromRoot pathFromRoot
enableAcme
; ;
} }

View file

@ -7,5 +7,4 @@
name = "root"; name = "root";
}; };
pathFromRoot = "/deployment/check/data-model-tf"; pathFromRoot = "/deployment/check/data-model-tf";
enableAcme = true;
} }

View file

@ -46,6 +46,5 @@ pkgs.testers.runNixOSTest {
targetMachines targetMachines
pathToRoot pathToRoot
pathFromRoot pathFromRoot
enableAcme
; ;
} }