aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/dbm.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/dbm.scm')
0 files changed, 0 insertions, 0 deletions
e %dico-socket (socket PF_INET SOCK_STREAM 0)) (test-runner-current (system-test-runner #$output)) (test-begin "dicod") ;; Wait for the service to be started. (test-assert "service is running" (marionette-eval '(begin (use-modules (gnu services herd)) (start-service 'dicod)) marionette)) ;; Wait until dicod is actually listening. ;; TODO: Use a PID file instead. (test-assert "connect inside" (wait-for-tcp-port 2628 marionette)) (test-assert "connect" (let ((addr (make-socket-address AF_INET INADDR_LOOPBACK 8000))) (connect %dico-socket addr) (read-line %dico-socket 'concat))) (test-equal "CLIENT" "250 ok\r\n" (begin (display "CLIENT \"GNU Guile\"\r\n" %dico-socket) (read-line %dico-socket 'concat))) (test-assert "DEFINE" (begin (display "DEFINE ! hello\r\n" %dico-socket) (display "QUIT\r\n" %dico-socket) (let ((result (read-string %dico-socket))) (and (string-contains result "gcide") (string-contains result "hello") result)))) (test-end)))) (gexp->derivation "dicod" test)) (define %test-dicod (system-test (name "dicod") (description "Connect to the dicod DICT server.") (value (run-dicod-test))))