nixos/lk-jwt-service: add test
This commit is contained in:
@@ -737,6 +737,7 @@ in
|
||||
listmonk = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./listmonk.nix { };
|
||||
litellm = runTest ./litellm.nix;
|
||||
litestream = handleTest ./litestream.nix { };
|
||||
lk-jwt-service = runTest ./matrix/lk-jwt-service.nix;
|
||||
lldap = handleTest ./lldap.nix { };
|
||||
localsend = handleTest ./localsend.nix { };
|
||||
locate = handleTest ./locate.nix { };
|
||||
|
||||
26
nixos/tests/matrix/lk-jwt-service.nix
Normal file
26
nixos/tests/matrix/lk-jwt-service.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
name = "lk-jwt-service";
|
||||
meta.maintainers = [ lib.maintainers.quadradical ];
|
||||
|
||||
nodes.machine = {
|
||||
services.lk-jwt-service = {
|
||||
enable = true;
|
||||
keyFile = pkgs.writers.writeYAML "keys.yaml" {
|
||||
key = "f6lQGaHtM5HfgZjIcec3cOCRfiDqIine4CpZZnqdT5cE";
|
||||
};
|
||||
livekitUrl = "wss://127.0.0.1:8100";
|
||||
port = 8000;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("lk-jwt-service.service")
|
||||
machine.wait_for_open_port(8000)
|
||||
machine.succeed('curl 127.0.0.1:8000/sfu/get -sLX POST -w "%{http_code}" | grep -q "^400"')
|
||||
'';
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
@@ -17,6 +18,8 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
vendorHash = "sha256-47eJO1Ai78RuhlEPn/J1cd+YSqvmfUD8cuPZIqsdxvI=";
|
||||
|
||||
passthru.tests = nixosTests.lk-jwt-service;
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/element-hq/lk-jwt-service/releases/tag/${finalAttrs.src.tag}";
|
||||
description = "Minimal service to issue LiveKit JWTs for MatrixRTC";
|
||||
|
||||
Reference in New Issue
Block a user