Merge pull request #203733 from nagy/freenet-nixos-test
nixosTests.freenet: init
This commit is contained in:
commit
4a057b08c4
|
@ -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