about summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-08-19 12:09:58 +0200
committerRobert Hensing <robert@roberthensing.nl>2022-09-24 17:42:52 +0100
commit7cdc9bc34012e367522b6ac7ed98631fa95c5deb (patch)
treebdc43a037a100379fe9950430125ff60acf04b41 /nixos/lib
parent6a78b414768de3f8107e1eecdf79121f3ee0c8a0 (diff)
nixos/testing: Improve interactive docs
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/testing/interactive.nix22
1 files changed, 21 insertions, 1 deletions
diff --git a/nixos/lib/testing/interactive.nix b/nixos/lib/testing/interactive.nix
index 43886fa726788..317ed4241882b 100644
--- a/nixos/lib/testing/interactive.nix
+++ b/nixos/lib/testing/interactive.nix
@@ -6,11 +6,31 @@ in
   options = {
     interactive = mkOption {
       description = mdDoc ''
-        Tests [can be run interactively](#sec-running-nixos-tests-interactively).
+        Tests [can be run interactively](#sec-running-nixos-tests-interactively)
+        using the program in the test derivation's `.driverInteractive` attribute.
 
         When they are, the configuration will include anything set in this submodule.
 
         You can set any top-level test option here.
+
+        Example test module:
+
+        ```nix
+        { config, lib, ... }: {
+
+          nodes.rabbitmq = {
+            services.rabbitmq.enable = true;
+          };
+
+          # When running interactively ...
+          interactive.nodes.rabbitmq = {
+            # ... enable the web ui.
+            services.rabbitmq.managementPlugin.enable = true;
+          };
+        }
+        ```
+
+        For details, see the section about [running tests interactively](#sec-running-nixos-tests-interactively).
       '';
       type = moduleType;
       visible = "shallow";