From 31f2d8ffbc1ff0da7f1e5aabbc5f505da6db2055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 26 Jan 2010 23:55:22 +0000 Subject: [PATCH] Add simple portmap test. svn path=/nixos/trunk/; revision=19700 --- tests/default.nix | 1 + tests/portmap.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/portmap.nix diff --git a/tests/default.nix b/tests/default.nix index 2efe151ab79..46b3218168f 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -31,6 +31,7 @@ in firefox = apply (import ./firefox.nix); installer = pkgs.lib.mapAttrs (name: complete) (call (import ./installer.nix)); kde4 = apply (import ./kde4.nix); + portmap = apply (import ./portmap.nix); proxy = apply (import ./proxy.nix); quake3 = apply (import ./quake3.nix); subversion = apply (import ./subversion.nix); diff --git a/tests/portmap.nix b/tests/portmap.nix new file mode 100644 index 00000000000..4ee4eb02890 --- /dev/null +++ b/tests/portmap.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +{ + + machine = + { config, pkgs, ... }: + + { services.portmap.enable = true; }; + + testScript = + '' + # The `portmap' service must be registered once for TCP and once for + # UDP. + $machine->mustSucceed("test `rpcinfo -p | grep portmapper | wc -l` -eq 2"); + ''; + +}