summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/guix.scm27
1 files changed, 23 insertions, 4 deletions
diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm
index 14982cf1b5c..8b692f28760 100644
--- a/gnu/tests/guix.scm
+++ b/gnu/tests/guix.scm
@@ -334,9 +334,10 @@ host all all ::1/128 trust"))))))
(service dhcpcd-service-type)
(service nar-herder-service-type
(nar-herder-configuration
- (host "0.0.0.0")
- ;; Not a realistic value, but works for the test
- (storage "/tmp")))))
+ (host "0.0.0.0")
+ (control-host "0.0.0.0")
+ ;; Not a realistic value, but works for the test
+ (storage "/tmp")))))
(define (run-nar-herder-test)
(define os
@@ -349,11 +350,17 @@ host all all ::1/128 trust"))))))
(nar-herder-configuration-port
(nar-herder-configuration)))
+ (define control-forwarded-port
+ (nar-herder-configuration-control-port
+ (nar-herder-configuration)))
+
(define vm
(virtual-machine
(operating-system os)
(memory-size 1024)
- (port-forwardings `((,forwarded-port . ,forwarded-port)))))
+ (port-forwardings `((,forwarded-port . ,forwarded-port)
+ (,control-forwarded-port
+ . ,control-forwarded-port)))))
(define test
(with-imported-modules '((gnu build marionette))
@@ -390,6 +397,16 @@ host all all ::1/128 trust"))))))
#:decode-body? #t)))
(response-code response)))
+ (test-equal "control http-get"
+ 404
+ (let-values
+ (((response text)
+ (http-get #$(simple-format
+ #f "http://localhost:~A/"
+ control-forwarded-port)
+ #:decode-body? #t)))
+ (response-code response)))
+
(test-end))))
(gexp->derivation "nar-herder-test" test))
@@ -477,3 +494,5 @@ host all all ::1/128 trust"))))))
(name "bffe")
(description "Connect to a running Build Farm Front-end.")
(value (run-bffe-test))))
+
+%nar-herder-os