mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
tests: base: Add host name resolution tests.
* gnu/tests/base.scm (run-basic-test)["host name resolution", "host not found"]: New tests.
This commit is contained in:
parent
9009538d84
commit
858d372c98
1 changed files with 21 additions and 0 deletions
|
@ -150,6 +150,27 @@ (define marionette
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue