nixos/tests/localsend: init

This commit is contained in:
Luis David Licea Torres 2024-05-12 17:07:22 -05:00 committed by John Titor
parent f5443063a2
commit 1cbd2f94cb
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0
3 changed files with 27 additions and 1 deletions

View File

@ -516,6 +516,7 @@ in {
listmonk = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./listmonk.nix {};
litestream = handleTest ./litestream.nix {};
lldap = handleTest ./lldap.nix {};
localsend = handleTest ./localsend.nix {};
locate = handleTest ./locate.nix {};
login = handleTest ./login.nix {};
logrotate = handleTest ./logrotate.nix {};

21
nixos/tests/localsend.nix Normal file
View File

@ -0,0 +1,21 @@
import ./make-test-python.nix (
{ ... }:
{
name = "localsend";
nodes.machine =
{ ... }:
{
imports = [ ./common/x11.nix ];
programs.localsend.enable = true;
};
testScript = ''
machine.wait_for_x()
machine.succeed("localsend_app >&2 &")
machine.wait_for_open_port(53317)
machine.wait_for_window("LocalSend", 10)
machine.succeed("netstat --listening --program --tcp | grep -P 'tcp.*53317.*localsend'")
'';
}
)

View File

@ -4,6 +4,7 @@
, fetchFromGitHub
, flutter313
, makeDesktopItem
, nixosTests
, pkg-config
, libayatana-appindicator
, undmg
@ -58,7 +59,10 @@ let
categories = [ "Network" ];
};
passthru.updateScript = ./update.sh;
passthru = {
updateScript = ./update.sh;
tests.localsend = nixosTests.localsend;
};
meta = metaCommon // {
mainProgram = "localsend_app";