summary refs log tree commit diff
path: root/nixos/tests/dhparams.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/dhparams.nix')
-rw-r--r--nixos/tests/dhparams.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/tests/dhparams.nix b/nixos/tests/dhparams.nix
index da75391e4ce..d11dfeec5d0 100644
--- a/nixos/tests/dhparams.nix
+++ b/nixos/tests/dhparams.nix
@@ -54,6 +54,13 @@ in import ./make-test.nix {
     security.dhparams.params.bar2.bits = 19;
   };
 
+  nodes.generation5 = {
+    imports = [ common ];
+    security.dhparams.defaultBitSize = 30;
+    security.dhparams.params.foo3 = {};
+    security.dhparams.params.bar3 = {};
+  };
+
   testScript = { nodes, ... }: let
     getParamPath = gen: name: let
       node = "generation${toString gen}";
@@ -126,5 +133,12 @@ in import ./make-test.nix {
         'expr match ${getParamPath 4 "bar2"} ${builtins.storeDir}',
       );
     };
+
+    ${switchToGeneration 5}
+
+    subtest "check whether defaultBitSize works as intended", sub {
+      ${assertParamBits 5 "foo3" 30}
+      ${assertParamBits 5 "bar3" 30}
+    };
   '';
 }