[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/08: tests: base: Add host name resolution tests.
From: |
Ludovic Courtès |
Subject: |
04/08: tests: base: Add host name resolution tests. |
Date: |
Mon, 27 Jun 2016 21:26:39 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 858d372c982594bf851d2b9cf82a9fa547c9651c
Author: Ludovic Courtès <address@hidden>
Date: Mon Jun 27 21:03:28 2016 +0200
tests: base: Add host name resolution tests.
* gnu/tests/base.scm (run-basic-test)["host name resolution",
"host not found"]: New tests.
---
gnu/tests/base.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 4fe7798..5786da5 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -150,6 +150,27 @@ info --version")
get-string-all)
marionette)))
+ (test-assert "host name resolution"
+ (match (marionette-eval
+ '(begin
+ ;; Wait for nscd or our requests go through it.
+ (use-modules (gnu services herd))
+ (start-service 'nscd)
+
+ (list (getaddrinfo "localhost")
+ (getaddrinfo #$(operating-system-host-name os))))
+ marionette)
+ ((((? vector?) ..1) ((? vector?) ..1))
+ #t)
+ (x
+ (pk 'failure x #f))))
+
+ (test-equal "host not found"
+ #f
+ (marionette-eval
+ '(false-if-exception (getaddrinfo "does-not-exist"))
+ marionette))
+
(test-assert "screendump"
(begin
(marionette-control (string-append "screendump " #$output
- branch master updated (aea7d1d -> d2fa61b), Ludovic Courtès, 2016/06/27
- 03/08: services: Export more service types., Ludovic Courtès, 2016/06/27
- 04/08: tests: base: Add host name resolution tests.,
Ludovic Courtès <=
- 01/08: doc: Fix typo for 'static-networking-service'., Ludovic Courtès, 2016/06/27
- 02/08: services: nscd: Wait for the PID file., Ludovic Courtès, 2016/06/27
- 05/08: tests: 'marionette-service-type' nows takes a <marionette-configuration>., Ludovic Courtès, 2016/06/27
- 07/08: services: avahi: Add #:debug? parameter., Ludovic Courtès, 2016/06/27
- 06/08: services: avahi: Pass --daemonize and check for the PID file., Ludovic Courtès, 2016/06/27
- 08/08: tests: Add Avahi and NSS-mDNS test., Ludovic Courtès, 2016/06/27