summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2017-12-12 06:48:48 +0000
committerChristopher Baines <mail@cbaines.net>2018-01-17 08:43:47 +0000
commitd067e4badcaa705d8cb68d81c534ba69c3fa6e13 (patch)
tree4fcc94241fdfe194f22304aaf39cf55672c33395 /gnu/tests
parentd9b530813f6d90d4aec320fd2f362d46b11a0125 (diff)
gnu: services: web: Add service for httpd.
* gnu/services/web.scm (<httpd-module>, <httpd-config-file>, <httpd-virtualhost> <httpd-configuration>): New record types. (%default-httpd-modules, %httpd-accounts, httpd-service-type): New variables. (httpd-shepherd-services, httpd-activation, httpd-process-extensions): New procedures. * gnu/tests/web.scm (run-httpd-test): New procedure. (%httpd-os, %tests-httpd): New variables. * doc/guix.texi (Web Services): Document the Apache HTTP Server.
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/web.scm26
1 files changed, 25 insertions, 1 deletions
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index 5595e9ddf9..1912f8f79d 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -29,7 +29,8 @@
#:use-module (gnu services networking)
#:use-module (guix gexp)
#:use-module (guix store)
- #:export (%test-nginx
+ #:export (%test-httpd
+ %test-nginx
%test-php-fpm))
(define %index.html-contents
@@ -114,6 +115,29 @@ HTTP-PORT."
;;;
+;;; HTTPD
+;;;
+
+(define %httpd-os
+ (simple-operating-system
+ (dhcp-client-service)
+ (service httpd-service-type
+ (httpd-configuration
+ (config
+ (httpd-config-file
+ (listen '("8080"))))))
+ (simple-service 'make-http-root activation-service-type
+ %make-http-root)))
+
+(define %test-httpd
+ (system-test
+ (name "httpd")
+ (description "Connect to a running HTTPD server.")
+ (value (run-webserver-test name %httpd-os
+ #:log-file "/var/log/httpd/error_log"))))
+
+
+;;;
;;; NGINX
;;;