aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorSimon Streit <simon@netpanic.org>2022-08-08 16:56:43 +0200
committerLars-Dominik Braun <lars@6xq.net>2022-09-24 09:41:24 +0200
commite1ce1009156d7923bcf1b93ca3918c9b18123007 (patch)
treebe24950fedc651a696113da24c81e9e20c54562a /gnu/tests
parent14359befa92d2d54af0e584724610d8a31f5ac63 (diff)
downloadguix-e1ce1009156d7923bcf1b93ca3918c9b18123007.tar.gz
guix-e1ce1009156d7923bcf1b93ca3918c9b18123007.zip
services: Add wsdd service.
* doc/guix.texi: Add documentation for wsdd service. * gnu/services/samba.scm (<wsdd-configuration>): New record. (wsdd-service-type): New variable. (wsdd-shepherd-services): New procedure. * gnu/tests/samba.scm (%wsdd-os): Add variable. (run-wsdd-test): New procedure. (%test-wsdd): New variable. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/samba.scm59
1 files changed, 58 insertions, 1 deletions
diff --git a/gnu/tests/samba.scm b/gnu/tests/samba.scm
index 27d7ea49c3..cb2762a90e 100644
--- a/gnu/tests/samba.scm
+++ b/gnu/tests/samba.scm
@@ -26,7 +26,8 @@
#:use-module (gnu packages samba)
#:use-module (guix gexp)
#:use-module (guix store)
- #:export (%test-samba))
+ #:export (%test-samba
+ %test-wsdd))
;;;
@@ -156,3 +157,59 @@
(name "samba")
(description "Connect to a running Samba daemon.")
(value (run-samba-test))))
+
+
+;;;
+;;; The wsdd service.
+;;;
+
+(define %wsdd-os
+ (let ((base-os (simple-operating-system
+ (service dhcp-client-service-type)
+ (service wsdd-service-type))))
+ (operating-system
+ (inherit base-os)
+ (packages (cons wsdd (operating-system-packages base-os))))))
+
+(define* (run-wsdd-test)
+ "Return a test of an OS running wsdd service."
+
+ (define vm
+ (virtual-machine
+ (operating-system (marionette-operating-system
+ %wsdd-os
+ #:imported-modules '((gnu services herd))))
+ (port-forwardings '((3702 . 3702)
+ (5357 . 5357)))))
+
+ (define test
+ (with-imported-modules '((gnu build marionette))
+ #~(begin
+ (use-modules (gnu build marionette)
+ (srfi srfi-26)
+ (srfi srfi-64))
+
+ (define marionette
+ (make-marionette '(#$vm)))
+
+ (test-runner-current (system-test-runner #$output))
+ (test-begin "wsdd")
+
+ ;; Here shall be more tests to begin with.
+
+ (test-assert "wsdd running"
+ (marionette-eval
+ '(begin
+ (use-modules (gnu services herd))
+ (start-service 'wsdd))
+ marionette))
+
+ (test-end))))
+
+ (gexp->derivation "wsdd-test" test))
+
+(define %test-wsdd
+ (system-test
+ (name "wsdd")
+ (description "Connect to a running wsdd daemon.")
+ (value (run-wsdd-test))))