diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2018-11-29 20:41:40 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2018-12-17 22:09:11 +0300 |
commit | 85c07cff9cd2197a16c2d3544e4930e278513cf7 (patch) | |
tree | 8429b1fa84a36f2b408fdc1bc4f3fd852d871f83 /gnu/tests/monitoring.scm | |
parent | 1a3e7534d0a02fad1d19173985cf47e1aaa3b956 (diff) | |
download | guix-85c07cff9cd2197a16c2d3544e4930e278513cf7.tar.gz |
services: monitoring: Add 'zabbix-front-end'.
* gnu/services/monitoring.scm (nginx-server-configuration-list?, serialize-nginx-server-configuration-list, zabbix-front-end-configuration, zabbix-front-end-config, zabbix-front-end-activation, generate-zabbix-front-end-documentation): New procedures. (%zabbix-front-end-configuration-nginx, %maintenance.inc.php, zabbix-front-end-service-type): New variables. * doc/guix.texi (Monitoring Services): Document this.
Diffstat (limited to 'gnu/tests/monitoring.scm')
-rw-r--r-- | gnu/tests/monitoring.scm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm index 76a2d3e946..ab72682aed 100644 --- a/gnu/tests/monitoring.scm +++ b/gnu/tests/monitoring.scm @@ -20,11 +20,13 @@ (define-module (gnu tests monitoring) #:use-module (gnu packages databases) #:use-module (gnu packages monitoring) + #:use-module (gnu packages php) #:use-module (gnu services) #:use-module (gnu services monitoring) #:use-module (gnu services networking) #:use-module (gnu services databases) #:use-module (gnu services shepherd) + #:use-module (gnu services web) #:use-module (gnu system vm) #:use-module (gnu system) #:use-module (gnu tests) @@ -249,6 +251,44 @@ zabbix||{} '(file-exists? "/var/run/zabbix/zabbix_agent.pid") marionette)) + ;; Wait for php-fpm to be up and running. + (test-assert "php-fpm running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'php-fpm)) + marionette)) + + ;; Wait for nginx to be up and running. + (test-assert "nginx running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'nginx)) + marionette)) + + ;; Make sure the PID file is created. + (test-assert "nginx PID file" + (marionette-eval + '(file-exists? "/var/run/nginx/pid") + marionette)) + + ;; Make sure we can access pages that correspond to our repository. + (letrec-syntax ((test-url + (syntax-rules () + ((_ path code) + (test-equal (string-append "GET " path) + code + (let-values (((response body) + (http-get (string-append + "http://localhost:8080" + path)))) + (response-code response)))) + ((_ path) + (test-url path 200))))) + (test-url "/") + (test-url "/does-not-exist" 404)) + (test-end) (exit (= (test-runner-fail-count (test-runner-current)) 0))))) @@ -261,6 +301,15 @@ zabbix||{} (simple-operating-system (service dhcp-client-service-type) (postgresql-service) + (service zabbix-front-end-service-type + (zabbix-front-end-configuration + (db-password "zabbix"))) + + (service php-fpm-service-type + (php-fpm-configuration + (timezone "Europe/Paris") + (php php-with-bcmath))) + (service zabbix-server-service-type (zabbix-server-configuration (db-password "zabbix") |