nixosTests.freenet: init

This commit is contained in:
Daniel Nagy 2022-11-29 18:30:00 +01:00
parent 1cb02bac2a
commit 807c2f1fc0
No known key found for this signature in database
GPG key ID: 1B8E8DCB576FB671
3 changed files with 23 additions and 1 deletions

View file

@ -213,6 +213,7 @@ in {
fluentd = handleTest ./fluentd.nix {};
fluidd = handleTest ./fluidd.nix {};
fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {};
freenet = handleTest ./freenet.nix {};
freeswitch = handleTest ./freeswitch.nix {};
freshrss = handleTest ./freshrss.nix {};
frr = handleTest ./frr.nix {};

19
nixos/tests/freenet.nix Normal file
View file

@ -0,0 +1,19 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "freenet";
meta = with pkgs.lib.maintainers; {
maintainers = [ nagy ];
};
nodes = {
machine = { ... }: {
services.freenet.enable = true;
};
};
testScript = ''
machine.wait_for_unit("freenet.service")
machine.wait_for_open_port(8888)
machine.wait_until_succeeds("curl -sfL http://localhost:8888/ | grep Freenet")
machine.succeed("systemctl stop freenet")
'';
})

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, jdk, bash, coreutils, substituteAll }:
{ lib, stdenv, fetchurl, jdk, bash, coreutils, substituteAll, nixosTests }:
let
version = "build01494";
@ -56,6 +56,8 @@ in stdenv.mkDerivation {
dontUnpack = true;
passthru.tests = { inherit (nixosTests) freenet; };
installPhase = ''
mkdir -p $out/bin
install -Dm555 $src $out/bin/freenet