about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2024-03-23 19:18:08 +0100
committerGitHub <noreply@github.com>2024-03-23 19:18:08 +0100
commite2a73469df88d26d4e7ac3dcda8c219d1e524fd9 (patch)
tree1e883c79e9fc140eebb5d81cdddaf216e0ae2f02 /nixos
parent0880fda831740996db10fbd915c09f18dd2ccc1e (diff)
parentbc54360b999bd059634d53a40db882bc969c2935 (diff)
Merge pull request #292645 from soispha/add-redlib
redlib: init at 0.31.0
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/redlib.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixos/tests/redlib.nix b/nixos/tests/redlib.nix
new file mode 100644
index 0000000000000..e4bde25e30a63
--- /dev/null
+++ b/nixos/tests/redlib.nix
@@ -0,0 +1,20 @@
+import ./make-test-python.nix ({ lib, pkgs, ... }: {
+  name = "redlib";
+  meta.maintainers = with lib.maintainers; [ soispha ];
+
+  nodes.machine = {
+    services.libreddit = {
+      package = pkgs.redlib;
+      enable = true;
+      # Test CAP_NET_BIND_SERVICE
+      port = 80;
+    };
+  };
+
+  testScript = ''
+    machine.wait_for_unit("libreddit.service")
+    machine.wait_for_open_port(80)
+    # Query a page that does not require Internet access
+    machine.succeed("curl --fail http://localhost:80/settings")
+  '';
+})