about summary refs log tree commit diff
path: root/kittybox.nix
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-05-19 01:27:56 +0300
committerVika <vika@fireburn.ru>2024-05-19 01:27:56 +0300
commit113a6f9fe6603be7488c1c9a5bb4b1b7c5bb2f71 (patch)
tree2d123cbe52f96cc1e470b754bb92d22776cb12df /kittybox.nix
parent9821be44cfdcbdc9c5a37b8eabddccabe0cbeabf (diff)
Move NixOS test initialization to the package
This allows to initialize tests easier and not have them depend on the
flake itself. This might be useful if I ever have to build this
package without a flake.
Diffstat (limited to 'kittybox.nix')
-rw-r--r--kittybox.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/kittybox.nix b/kittybox.nix
index 1d66fc7..eea7006 100644
--- a/kittybox.nix
+++ b/kittybox.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, naersk, lld, mold, typescript
 , useWebAuthn ? false, openssl, zlib, pkg-config, protobuf
 , usePostgres ? true, postgresql, postgresqlTestHook
-, nixosTests }:
+, nixosTest }:
 
 assert useWebAuthn -> openssl != null && pkg-config != null;
 assert usePostgres -> postgresql != null && postgresqlTestHook != null;
@@ -36,7 +36,14 @@ naersk.buildPackage rec {
   '';
 
   passthru = {
-    tests = nixosTests;
+    tests = {
+      distributed = nixosTest ./nixos-tests/distributed-test.nix;
+      smokeTest = nixosTest ./nixos-tests/smoke-test.nix;
+    } // (lib.optionalAttrs usePostgres {
+      webmention = nixosTest ./nixos-tests/webmention-test.nix;
+      postgresSmokeTest = nixosTest ./nixos-tests/postgres-smoke-test.nix;
+    });
+
     hasPostgres = usePostgres;
   };