mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
fix(testing): e2e testing fixes
This commit is contained in:
parent
3549610e0e
commit
b43748a3a5
1 changed files with 41 additions and 41 deletions
|
|
@ -29,10 +29,11 @@ let
|
|||
in nixosTesting.makeTest {
|
||||
inherit name;
|
||||
|
||||
nodes = mapAttrs (machineName: machine:
|
||||
{ config, pkgs, lib, nodes, ... }:
|
||||
mkMerge [
|
||||
{
|
||||
nodes = mapAttrs (machineName: machine: { config, pkgs, lib, nodes, ... }: {
|
||||
imports = [<nixpkgs/nixos/modules/profiles/minimal.nix>];
|
||||
|
||||
config = mkMerge [{
|
||||
virtualisation.cores = "all";
|
||||
boot.postBootCommands = "rm -fr /var/lib/kubernetes/secrets /tmp/shared/*";
|
||||
virtualisation.memorySize = mkDefault 1536;
|
||||
virtualisation.diskSize = mkDefault 4096;
|
||||
|
|
@ -69,9 +70,8 @@ let
|
|||
];
|
||||
})
|
||||
(optionalAttrs (machine ? "extraConfiguration") (machine.extraConfiguration { inherit config pkgs lib nodes; }))
|
||||
(optionalAttrs (extraConfiguration != null) (extraConfiguration { inherit config pkgs lib nodes; }))
|
||||
]
|
||||
) machines;
|
||||
(optionalAttrs (extraConfiguration != null) (extraConfiguration { inherit config pkgs lib nodes; }))];
|
||||
}) machines;
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
|
@ -190,7 +190,7 @@ in {
|
|||
script = if evaled.config.test.check != null then mkKubernetesSingleNodeTest {
|
||||
name = config.name;
|
||||
test = ''
|
||||
$kube->waitUntilSucceeds("kubectl get node machine1.my.zyx | grep -w Ready");
|
||||
$kube->waitUntilSucceeds("kubectl get node kube.my.zyx | grep -w Ready");
|
||||
${evaled.config.test.check}
|
||||
'';
|
||||
} else null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue