diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index b9a6311eaf35..eab4c40c0b74 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/localsend.nix b/nixos/tests/localsend.nix new file mode 100644 index 000000000000..8c0a6ac68190 --- /dev/null +++ b/nixos/tests/localsend.nix @@ -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'") + ''; + } +) diff --git a/pkgs/applications/networking/localsend/default.nix b/pkgs/applications/networking/localsend/default.nix index bd681b74eebb..be540d58da81 100644 --- a/pkgs/applications/networking/localsend/default.nix +++ b/pkgs/applications/networking/localsend/default.nix @@ -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";