;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Simon Streit ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu tests samba) #:use-module (gnu tests) #:use-module (gnu system) #:use-module (gnu system vm) #:use-module (gnu services) #:use-module (gnu services networking) #:
aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions
ait-for-file "/var/run/samba/nmbd.pid" marionette)))) (marionette-eval `(file-exists? (string-append "/proc/" ,pid)) marionette))) (test-assert "winbindd service process id" (let ((pid (number->string (wait-for-file "/var/run/samba/winbindd.pid" marionette)))) (marionette-eval `(file-exists? (string-append "/proc/" ,pid)) marionette))) (test-assert "samba-smbd is listening for peers" (wait-for-tcp-port 445 marionette)) (test-equal "smbclient connect" 0 (marionette-eval '(system* #$(file-append samba "/bin/smbclient") "--list=localhost" "--no-pass") marionette)) (test-equal "smbclient connect" 0 (marionette-eval '(system* #$(file-append samba "/bin/smbclient") "--list=localhost" "--no-pass") marionette)) (test-end)))) (gexp->derivation "samba-test" test)) (define %test-samba (system-test (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))))