about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/README.md16
-rw-r--r--tests/by-name/le/less/data/test.file.license9
-rw-r--r--tests/by-name/le/less/test.desc.license9
-rw-r--r--tests/by-name/le/less/test.nix9
-rw-r--r--tests/by-name/nv/nvim-checkhealth/test.desc.license9
-rw-r--r--tests/by-name/nv/nvim-checkhealth/test.nix9
-rw-r--r--tests/by-name/nv/nvim-neorg/data/index.norg.license9
-rw-r--r--tests/by-name/nv/nvim-neorg/data/reference.norg.license9
-rw-r--r--tests/by-name/nv/nvim-neorg/test.desc2
-rw-r--r--tests/by-name/nv/nvim-neorg/test.desc.license9
-rw-r--r--tests/by-name/nv/nvim-neorg/test.nix9
-rw-r--r--tests/by-name/ya/yambar/test.desc.license9
-rw-r--r--tests/by-name/ya/yambar/test.nix9
-rw-r--r--tests/default.nix13
-rw-r--r--tests/infrastructure/clean.awk10
-rw-r--r--tests/infrastructure/default.nix19
-rw-r--r--tests/infrastructure/driver.sh11
-rw-r--r--tests/infrastructure/run.nix9
18 files changed, 174 insertions, 5 deletions
diff --git a/tests/README.md b/tests/README.md
index f789c990..34dc9255 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -1,6 +1,18 @@
+<!--
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+-->
+
 # How to write a test
 
-Test are simple derivations, put into the `by-name` directory.  As you
+Test are simple derivations, put into the `by-name` directory. As you
 often want to test configuration, the 'standard' nixos-vm-test function
 starts a vm with the specified configuration and lets you run a python
 test script.
@@ -78,7 +90,7 @@ Sleep for `ARGS` seconds.
 
 #### `Expect`
 
-Grep the currently visible screen for the regex `ARGS`.  This regex
+Grep the currently visible screen for the regex `ARGS`. This regex
 must match.
 
 #### `ExpectNot`
diff --git a/tests/by-name/le/less/data/test.file.license b/tests/by-name/le/less/data/test.file.license
new file mode 100644
index 00000000..eae6a84c
--- /dev/null
+++ b/tests/by-name/le/less/data/test.file.license
@@ -0,0 +1,9 @@
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
diff --git a/tests/by-name/le/less/test.desc.license b/tests/by-name/le/less/test.desc.license
new file mode 100644
index 00000000..eae6a84c
--- /dev/null
+++ b/tests/by-name/le/less/test.desc.license
@@ -0,0 +1,9 @@
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
diff --git a/tests/by-name/le/less/test.nix b/tests/by-name/le/less/test.nix
index cdd8209c..c9716ffc 100644
--- a/tests/by-name/le/less/test.nix
+++ b/tests/by-name/le/less/test.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {mkTest, ...}:
 mkTest {
   name = "less";
diff --git a/tests/by-name/nv/nvim-checkhealth/test.desc.license b/tests/by-name/nv/nvim-checkhealth/test.desc.license
new file mode 100644
index 00000000..eae6a84c
--- /dev/null
+++ b/tests/by-name/nv/nvim-checkhealth/test.desc.license
@@ -0,0 +1,9 @@
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
diff --git a/tests/by-name/nv/nvim-checkhealth/test.nix b/tests/by-name/nv/nvim-checkhealth/test.nix
index 399a25ff..cb04e758 100644
--- a/tests/by-name/nv/nvim-checkhealth/test.nix
+++ b/tests/by-name/nv/nvim-checkhealth/test.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   mkTest,
   extraModules,
diff --git a/tests/by-name/nv/nvim-neorg/data/index.norg.license b/tests/by-name/nv/nvim-neorg/data/index.norg.license
new file mode 100644
index 00000000..eae6a84c
--- /dev/null
+++ b/tests/by-name/nv/nvim-neorg/data/index.norg.license
@@ -0,0 +1,9 @@
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
diff --git a/tests/by-name/nv/nvim-neorg/data/reference.norg.license b/tests/by-name/nv/nvim-neorg/data/reference.norg.license
new file mode 100644
index 00000000..eae6a84c
--- /dev/null
+++ b/tests/by-name/nv/nvim-neorg/data/reference.norg.license
@@ -0,0 +1,9 @@
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
diff --git a/tests/by-name/nv/nvim-neorg/test.desc b/tests/by-name/nv/nvim-neorg/test.desc
index bd7b7312..bd1e8f49 100644
--- a/tests/by-name/nv/nvim-neorg/test.desc
+++ b/tests/by-name/nv/nvim-neorg/test.desc
@@ -61,7 +61,7 @@ Sleep 0.5
 
 
 Type 10t
-Sleep 0.5
+Sleep 1.0
 
 Expect ^11\s*◉ Some other content$
 
diff --git a/tests/by-name/nv/nvim-neorg/test.desc.license b/tests/by-name/nv/nvim-neorg/test.desc.license
new file mode 100644
index 00000000..eae6a84c
--- /dev/null
+++ b/tests/by-name/nv/nvim-neorg/test.desc.license
@@ -0,0 +1,9 @@
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
diff --git a/tests/by-name/nv/nvim-neorg/test.nix b/tests/by-name/nv/nvim-neorg/test.nix
index ee0e1b52..9f160df5 100644
--- a/tests/by-name/nv/nvim-neorg/test.nix
+++ b/tests/by-name/nv/nvim-neorg/test.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   mkTest,
   extraModules,
diff --git a/tests/by-name/ya/yambar/test.desc.license b/tests/by-name/ya/yambar/test.desc.license
new file mode 100644
index 00000000..eae6a84c
--- /dev/null
+++ b/tests/by-name/ya/yambar/test.desc.license
@@ -0,0 +1,9 @@
+nixos-config - My current NixOS configuration
+
+Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of my nixos-config.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
diff --git a/tests/by-name/ya/yambar/test.nix b/tests/by-name/ya/yambar/test.nix
index c0e94110..0e4d0033 100644
--- a/tests/by-name/ya/yambar/test.nix
+++ b/tests/by-name/ya/yambar/test.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {mkTest, ...}:
 mkTest {
   name = "yambar";
diff --git a/tests/default.nix b/tests/default.nix
index c36a5906..d13723b4 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   lib,
   nixLib,
@@ -6,6 +15,8 @@
   nixpkgs_as_input,
   sysLib,
   extraModules,
+  nixpkgs_open_prs,
+  system,
 }: let
   mkTest = import ./infrastructure {
     inherit
@@ -15,6 +26,8 @@
       myPkgs
       extraModules
       sysLib
+      nixpkgs_open_prs
+      system
       ;
   };
 
diff --git a/tests/infrastructure/clean.awk b/tests/infrastructure/clean.awk
index 1208b1ef..0362d38b 100644
--- a/tests/infrastructure/clean.awk
+++ b/tests/infrastructure/clean.awk
@@ -1,3 +1,13 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
 {
     # Shell like comments
     gsub(/^#.*$/, "", $0)
diff --git a/tests/infrastructure/default.nix b/tests/infrastructure/default.nix
index e0ad6889..cd21198c 100644
--- a/tests/infrastructure/default.nix
+++ b/tests/infrastructure/default.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   pkgs,
   myPkgs,
@@ -5,7 +14,8 @@
   nixos-lib,
   extraModules,
   sysLib,
-  ...
+  nixpkgs_open_prs,
+  system,
 }: {
   name,
   configuration,
@@ -22,7 +32,12 @@ nixos-lib.runTest {
 
   node = {
     specialArgs = {
-      inherit myPkgs sysLib;
+      inherit
+        myPkgs
+        sysLib
+        nixpkgs_open_prs
+        system
+        ;
     };
     # Use the nixpkgs as constructed by the `nixpkgs.*` options
     pkgs = null;
diff --git a/tests/infrastructure/driver.sh b/tests/infrastructure/driver.sh
index 4992b5bc..a8b241d2 100644
--- a/tests/infrastructure/driver.sh
+++ b/tests/infrastructure/driver.sh
@@ -1,4 +1,15 @@
 #! /usr/bin/env bash
+
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
 set -e
 
 msg() {
diff --git a/tests/infrastructure/run.nix b/tests/infrastructure/run.nix
index 5bab3dc4..3148a2d9 100644
--- a/tests/infrastructure/run.nix
+++ b/tests/infrastructure/run.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   pkgs,
   lib,