;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2020, 2021, 2022 Christopher Baines ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu tests guix) #:use-module (gnu tests) #:use-module (gnu system) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu system vm) #:use-m
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2024-01-01 19:15:52 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2024-01-02 00:43:09 +0100
commit27ab4e948aa65d9b006582236be3d89e2503e457 (patch)
tree5104417396da278c824f6a15b62b610e349ef7eb
parent5a977eb98cf611826d9f2c3cef54f95aac002e99 (diff)
downloadguix-27ab4e948aa65d9b006582236be3d89e2503e457.tar.gz
guix-27ab4e948aa65d9b006582236be3d89e2503e457.zip
gnu: emacs-marginalia: Update to 1.5.
* gnu/packages/emacs-xyz.scm (emacs-marginalia): Update to 1.5. Change-Id: Id57e4fe99764856dc46ae3324077a00b6ac0af52
e-type) (service postgresql-service-type (postgresql-configuration (postgresql postgresql-10) (config-file (postgresql-config-file (hba-file (plain-file "pg_hba.conf" " local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust")))))) (service guix-data-service-type (guix-data-service-configuration (host "0.0.0.0"))) (simple-service 'guix-data-service-database-setup shepherd-root-service-type (list guix-data-service-initial-database-setup-service)))) (define (run-guix-data-service-test) (define os (marionette-operating-system %guix-data-service-os #:imported-modules '((gnu services herd) (guix combinators)))) (define forwarded-port 8080) (define vm (virtual-machine (operating-system os) (memory-size 1024) (port-forwardings `((,forwarded-port . 8765))))) (define test (with-imported-modules '((gnu build marionette)) #~(begin (use-modules (srfi srfi-11) (srfi srfi-64) (gnu build marionette) (web uri) (web client) (web response)) (define marionette (make-marionette (list #$vm))) (test-runner-current (system-test-runner #$output)) (test-begin "guix-data-service") (test-assert "service running" (marionette-eval '(begin (use-modules (gnu services herd)) (match (start-service 'guix-data-service) (#f #f) (('service response-parts ...) (match (assq-ref response-parts 'running) ((pid) (number? pid)))))) marionette)) (test-assert "process jobs service running" (marionette-eval '(begin (use-modules (gnu services herd)) (match (start-service 'guix-data-service-process-jobs) (#f #f) (('service response-parts ...) (match (assq-ref response-parts 'running) ((pid) (number? pid)))))) marionette)) (test-equal "http-get" 200 (let-values (((response text) (http-get #$(simple-format #f "http://localhost:~A/healthcheck" forwarded-port) #:decode-body? #t))) (response-code response))) (test-end)))) (gexp->derivation "guix-data-service-test" test)) (define %test-guix-data-service (system-test (name "guix-data-service") (description "Connect to a running Guix Data Service.") (value (run-guix-data-service-test)))) ;;; ;;; Nar Herder ;;; (define %nar-herder-os (simple-operating-system (service dhcp-client-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"))))) (define (run-nar-herder-test) (define os (marionette-operating-system %nar-herder-os #:imported-modules '((gnu services herd) (guix combinators)))) (define forwarded-port (nar-herder-configuration-port (nar-herder-configuration))) (define vm (virtual-machine (operating-system os) (memory-size 1024) (port-forwardings `((,forwarded-port . ,forwarded-port))))) (define test (with-imported-modules '((gnu build marionette)) #~(begin (use-modules (srfi srfi-11) (srfi srfi-64) (gnu build marionette) (web uri) (web client) (web response)) (define marionette (make-marionette (list #$vm))) (test-runner-current (system-test-runner #$output)) (test-begin "nar-herder") (test-assert "service running" (marionette-eval '(begin (use-modules (gnu services herd)) (match (start-service 'nar-herder) (#f #f) (('service response-parts ...) (match (assq-ref response-parts 'running) ((pid) (number? pid)))))) marionette)) (test-equal "http-get" 404 (let-values (((response text) (http-get #$(simple-format #f "http://localhost:~A/" forwarded-port) #:decode-body? #t))) (response-code response))) (test-end)))) (gexp->derivation "nar-herder-test" test)) (define %test-nar-herder (system-test (name "nar-herder") (description "Connect to a running Nar Herder server.") (value (run-nar-herder-test))))