nixosTests.freenet: init
This commit is contained in:
parent
1cb02bac2a
commit
807c2f1fc0
3 changed files with 23 additions and 1 deletions
|
@ -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
19
nixos/tests/freenet.nix
Normal 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")
|
||||
'';
|
||||
})
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue