livekit: add test

This commit is contained in:
Henry-Hiles 2025-04-29 01:02:53 -04:00
parent d237673ba4
commit c8f4df349c
No known key found for this signature in database
3 changed files with 29 additions and 0 deletions

View File

@ -731,6 +731,7 @@ in
lidarr = handleTest ./lidarr.nix { };
lightdm = handleTest ./lightdm.nix { };
lighttpd = runTest ./lighttpd.nix;
livekit = runTest ./networking/livekit.nix;
limesurvey = handleTest ./limesurvey.nix { };
limine = import ./limine { inherit runTest; };
listmonk = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./listmonk.nix { };

View File

@ -0,0 +1,25 @@
{
pkgs,
lib,
...
}:
{
name = "livekit";
meta.maintainers = [ lib.maintainers.quadradical ];
nodes.machine = {
services.livekit = {
enable = true;
keyFile = pkgs.writers.writeYAML "keys.yaml" {
key = "f6lQGaHtM5HfgZjIcec3cOCRfiDqIine4CpZZnqdT5cE";
};
settings.port = 8000;
};
};
testScript = ''
machine.wait_for_unit("livekit.service")
machine.wait_for_open_port(8000)
machine.succeed("curl 127.0.0.1:8000 -L --fail")
'';
}

View File

@ -2,6 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
buildGoModule rec {
@ -23,6 +24,8 @@ buildGoModule rec {
mv $out/bin/server $out/bin/livekit-server
'';
passthru.tests = nixosTests.livekit;
meta = with lib; {
description = "End-to-end stack for WebRTC. SFU media server and SDKs";
homepage = "https://livekit.io/";