Merge pull request #177174 from fgaz/zeronet-conservancy/0.7.6

zeronet-conservancy: 0.7.5 -> 0.7.6, add nixos test
This commit is contained in:
Sandro 2022-06-19 01:34:44 +02:00 committed by GitHub
commit 861771aac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 2 deletions

View file

@ -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 {};

View 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")
'';
})

View file

@ -1,18 +1,19 @@
{ lib { lib
, fetchFromGitHub , fetchFromGitHub
, python3Packages , python3Packages
, nixosTests
}: }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "zeronet-conservancy"; pname = "zeronet-conservancy";
version = "0.7.5"; version = "0.7.6";
format = "other"; format = "other";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "zeronet-conservancy"; owner = "zeronet-conservancy";
repo = "zeronet-conservancy"; repo = "zeronet-conservancy";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-cq0q5hXEhazHPJODNJ8iL0qAB5DJW6ANST4r/rslvXk="; sha256 = "sha256-tWNU7UJVWB+aRLam6WKV/HaRRTIQvlEgxe4xJYKpXJY=";
}; };
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [
@ -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 = ''