mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
zeronet-conservancy: add nixos test
This commit is contained in:
parent
67eb7a1d55
commit
3cfdd35ff6
@ -613,6 +613,7 @@ in {
|
|||||||
yabar = handleTest ./yabar.nix {};
|
yabar = handleTest ./yabar.nix {};
|
||||||
yggdrasil = handleTest ./yggdrasil.nix {};
|
yggdrasil = handleTest ./yggdrasil.nix {};
|
||||||
zammad = handleTest ./zammad.nix {};
|
zammad = handleTest ./zammad.nix {};
|
||||||
|
zeronet-conservancy = handleTest ./zeronet-conservancy.nix {};
|
||||||
zfs = handleTest ./zfs.nix {};
|
zfs = handleTest ./zfs.nix {};
|
||||||
zigbee2mqtt = handleTest ./zigbee2mqtt.nix {};
|
zigbee2mqtt = handleTest ./zigbee2mqtt.nix {};
|
||||||
zoneminder = handleTest ./zoneminder.nix {};
|
zoneminder = handleTest ./zoneminder.nix {};
|
||||||
|
25
nixos/tests/zeronet-conservancy.nix
Normal file
25
nixos/tests/zeronet-conservancy.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
let
|
||||||
|
port = 43110;
|
||||||
|
in
|
||||||
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
|
name = "zeronet-conservancy";
|
||||||
|
meta = with pkgs.lib.maintainers; {
|
||||||
|
maintainers = [ fgaz ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes.machine = { config, pkgs, ... }: {
|
||||||
|
services.zeronet = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.zeronet-conservancy;
|
||||||
|
inherit port;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
machine.wait_for_unit("zeronet.service")
|
||||||
|
|
||||||
|
machine.wait_for_open_port(${toString port})
|
||||||
|
|
||||||
|
machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats")
|
||||||
|
'';
|
||||||
|
})
|
@ -1,6 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, python3Packages
|
, python3Packages
|
||||||
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
@ -35,6 +36,10 @@ python3Packages.buildPythonApplication rec {
|
|||||||
--set PATH ${python3Packages.python}/bin
|
--set PATH ${python3Packages.python}/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
nixos-test = nixosTests.zeronet-conservancy;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A fork/continuation of the ZeroNet project";
|
description = "A fork/continuation of the ZeroNet project";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user