summaryrefslogtreecommitdiff
path: root/html/import_frame.js
AgeCommit message (Expand)Author
2021-09-01add styling to settings install(import) dialogWojtek Kosior
2021-08-27start using `<template>' tagWojtek Kosior
2021-08-06Facilitate installation of scripts from the repository...Wojtek Kosior
ette-operating-system %samba-os #:imported-modules '((gnu services herd)))) (port-forwardings '((8135 . 135) (8137 . 137) (8138 . 138) (8445 . 445))))) (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 "samba") (test-assert "samba-smbd running" (marionette-eval '(begin (use-modules (gnu services herd)) (start-service 'samba-smbd)) marionette)) (test-assert "samba-nmbd running" (marionette-eval '(begin (use-modules (gnu services herd)) (start-service 'samba-nmbd)) marionette)) (test-assert "samba-winbindd running" (marionette-eval '(begin (use-modules (gnu services herd)) (start-service 'samba-winbindd)) marionette)) (test-assert "smbd service process id" (let ((pid (number->string (wait-for-file "/var/run/samba/smbd.pid" marionette)))) (marionette-eval `(file-exists? (string-append "/proc/" ,pid)) marionette))) (test-assert "nmbd service process id" (let ((pid (number->string (wait-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))))