about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAlexandre Macabies <web+oss@zopieux.com>2022-06-27 00:20:04 +0200
committerPeter Hoeg <peter@hoeg.com>2022-06-27 09:14:57 +0800
commit32964dd23d1b5522015e0c9d5134ff2542156a16 (patch)
tree835361ba006f9caa7b6049271ad19d715e36af14 /nixos
parent37f4b6bc1c1f0f1bb5dec1a0bd8084dface512df (diff)
pykms: switch to maintained fork, fix PYTHONPATH, add test
I have read the full diff[0] between the previous owner and the new
maintained fork that I'm switching to, and could not find any suspicious
code. The new fork includes fixes that are otherwise crashing as of
Python 3.10.

This commit also fixes the PYTHONPATH which prevents the client from
starting.

This commit also adds a test that the client can successfully query the
server, testing the two components at once.

[0] https://github.com/SystemRage/py-kms/compare/master...Py-KMS-Organization:master
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/pykms.nix14
2 files changed, 15 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 87bed40eac9e8..e625fa7f2c284 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -458,6 +458,7 @@ in {
   proxy = handleTest ./proxy.nix {};
   prowlarr = handleTest ./prowlarr.nix {};
   pt2-clone = handleTest ./pt2-clone.nix {};
+  pykms = handleTest ./pykms.nix {};
   public-inbox = handleTest ./public-inbox.nix {};
   pulseaudio = discoverTests (import ./pulseaudio.nix);
   qboot = handleTestOn ["x86_64-linux" "i686-linux"] ./qboot.nix {};
diff --git a/nixos/tests/pykms.nix b/nixos/tests/pykms.nix
new file mode 100644
index 0000000000000..14d776a2f113e
--- /dev/null
+++ b/nixos/tests/pykms.nix
@@ -0,0 +1,14 @@
+import ./make-test-python.nix ({ pkgs, ... }:
+  {
+    name = "pykms-test";
+    meta.maintainers = with pkgs.lib.maintainers; [ zopieux ];
+
+    nodes.machine = { config, lib, pkgs, ... }: {
+      services.pykms.enable = true;
+    };
+
+    testScript = ''
+      machine.wait_for_unit("pykms.service")
+      machine.succeed("${pkgs.pykms}/bin/client")
+    '';
+  })