summary refs log tree commit diff
path: root/gnu/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-13 11:02:13 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-13 14:59:45 +0100
commitd3f75179e5741db29358e3e723146fd20ec79de9 (patch)
tree0994f9c9a433ae4296e0764ce551dd7ff009897a /gnu/tests
parent190877748eeadff475dca822847fb3a5cc4467b9 (diff)
downloadguix-d3f75179e5741db29358e3e723146fd20ec79de9.tar.gz
services: nscd: Add 'invalidate' and 'statistics' actions.
* gnu/services/base.scm (nscd-action-procedure, nscd-actions): New
procedures.
(nscd-shepherd-service): Add 'modules' and 'actions' fields.
* gnu/tests/base.scm (run-basic-test)["nscd invalidate action"]
["nscd invalidate action, wrong table"]: New tests.
* doc/guix.texi (Services): Mention 'herd doc nscd action'.
(Base Services): Document the actions.
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/base.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 896d4a8f88..02882f4b46 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -335,6 +335,20 @@ info --version")
               (x
                (pk 'failure x #f))))
 
+          (test-equal "nscd invalidate action"
+            '(#t)                                 ;one value, #t
+            (marionette-eval '(with-shepherd-action 'nscd ('invalidate "hosts")
+                                                    result
+                                                    result)
+                             marionette))
+
+          (test-equal "nscd invalidate action, wrong table"
+            '(#f)                                 ;one value, #f
+            (marionette-eval '(with-shepherd-action 'nscd ('invalidate "xyz")
+                                                    result
+                                                    result)
+                             marionette))
+
           (test-equal "host not found"
             #f
             (marionette-eval