all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Léo Le Bouter via Guix-patches via" <guix-patches@gnu.org>
To: 47081@debbugs.gnu.org
Cc: "Léo Le Bouter" <lle-bout@zaclys.net>
Subject: [bug#47081] [PATCH v2 4/6] tests: databases: Remove mongodb test.
Date: Fri, 12 Mar 2021 01:59:13 +0100	[thread overview]
Message-ID: <20210312005915.14100-4-lle-bout@zaclys.net> (raw)
In-Reply-To: <20210312005915.14100-1-lle-bout@zaclys.net>

* gnu/tests/databases.scm (%test-mongodb, %mongodb-os, run-mongodb-test):
Remove.
---
 gnu/tests/databases.scm | 83 -----------------------------------------
 1 file changed, 83 deletions(-)

diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm
index e831d69f5a..4bfe4ee282 100644
--- a/gnu/tests/databases.scm
+++ b/gnu/tests/databases.scm
@@ -30,7 +30,6 @@
   #:use-module (guix gexp)
   #:use-module (guix store)
   #:export (%test-memcached
-            %test-mongodb
             %test-postgresql
             %test-mysql))
 
@@ -127,88 +126,6 @@
    (description "Connect to a running MEMCACHED server.")
    (value (run-memcached-test))))
 
-(define %mongodb-os
-  (operating-system
-    (inherit
-     (simple-operating-system
-      (service dhcp-client-service-type)
-      (service mongodb-service-type)))
-    (packages (cons* mongodb
-                     %base-packages))))
-
-(define* (run-mongodb-test #:optional (port 27017))
-  "Run tests in %MONGODB-OS, forwarding PORT."
-  (define os
-    (marionette-operating-system
-     %mongodb-os
-     #:imported-modules '((gnu services herd)
-                          (guix combinators))))
-
-  (define vm
-    (virtual-machine
-     (operating-system os)
-     (memory-size 1024)
-     (disk-image-size (* 1024 (expt 2 20)))
-     (port-forwardings `((27017 . ,port)))))
-
-  (define test
-    (with-imported-modules '((gnu build marionette))
-      #~(begin
-          (use-modules (srfi srfi-11) (srfi srfi-64)
-                       (gnu build marionette)
-                       (ice-9 popen)
-                       (ice-9 rdelim))
-
-          (define marionette
-            (make-marionette (list #$vm)))
-
-          (mkdir #$output)
-          (chdir #$output)
-
-          (test-begin "mongodb")
-
-          (test-assert "service running"
-            (marionette-eval
-             '(begin
-                (use-modules (gnu services herd))
-                (match (start-service 'mongodb)
-                  (#f #f)
-                  (('service response-parts ...)
-                   (match (assq-ref response-parts 'running)
-                     ((pid) (number? pid))))))
-             marionette))
-
-          (test-eq "test insert"
-            0
-            (system* (string-append #$mongodb "/bin/mongo")
-                     "test"
-                     "--eval"
-                     "db.testCollection.insert({data: 'test-data'})"))
-
-          (test-equal "test find"
-            "test-data"
-            (let* ((port (open-pipe*
-                          OPEN_READ
-                          (string-append #$mongodb "/bin/mongo")
-                          "test"
-                          "--quiet"
-                          "--eval"
-                          "db.testCollection.findOne().data"))
-                   (output (read-line port))
-                   (status (close-pipe port)))
-              output))
-
-          (test-end)
-          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
-
-  (gexp->derivation "mongodb-test" test))
-
-(define %test-mongodb
-  (system-test
-   (name "mongodb")
-   (description "Connect to a running MONGODB server.")
-   (value (run-mongodb-test))))
-
 \f
 ;;;
 ;;; The PostgreSQL service.
-- 
2.30.2





  parent reply	other threads:[~2021-03-12  1:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  0:56 [bug#47081] [PATCH 0/5] gnu: Remove mongodb Léo Le Bouter via Guix-patches via
2021-03-12  0:57 ` [bug#47081] [PATCH 1/5] gnu: Remove mongo-tools Léo Le Bouter via Guix-patches via
2021-03-12  0:57   ` [bug#47081] [PATCH 2/5] doc: Remove mongodb-service-type Léo Le Bouter via Guix-patches via
2021-03-12  0:57   ` [bug#47081] [PATCH 3/5] tests: databases: Remove mongodb test Léo Le Bouter via Guix-patches via
2021-03-12  0:57   ` [bug#47081] [PATCH 4/5] services: Remove mongodb service Léo Le Bouter via Guix-patches via
2021-03-12  0:57   ` [bug#47081] [PATCH 5/5] gnu: Remove mongodb Léo Le Bouter via Guix-patches via
2021-03-12  0:59 ` [bug#47081] [PATCH v2 1/6] gnu: Remove go-gopkg.in-mgo.v2 Léo Le Bouter via Guix-patches via
2021-03-12  0:59   ` [bug#47081] [PATCH v2 2/6] gnu: Remove mongo-tools Léo Le Bouter via Guix-patches via
2021-03-12  0:59   ` [bug#47081] [PATCH v2 3/6] doc: Remove mongodb-service-type Léo Le Bouter via Guix-patches via
2021-03-12  0:59   ` Léo Le Bouter via Guix-patches via [this message]
2021-03-12  0:59   ` [bug#47081] [PATCH v2 5/6] services: Remove mongodb service Léo Le Bouter via Guix-patches via
2021-03-14 14:54     ` Christopher Baines
2021-03-14 14:58       ` Léo Le Bouter via Guix-patches via
2021-03-14 15:31         ` Christopher Baines
2021-03-16 10:11           ` bug#47081: " Léo Le Bouter via Guix-patches via
2021-03-12  0:59   ` [bug#47081] [PATCH v2 6/6] gnu: Remove mongodb Léo Le Bouter via Guix-patches via
2021-03-17 16:56 ` Why [bug#47081] Remove mongodb? zimoun
2021-03-17 17:09   ` Léo Le Bouter
2021-03-17 17:56     ` zimoun
2021-03-17 18:16       ` Léo Le Bouter
2021-03-17 18:51         ` zimoun
2021-03-17 19:05           ` Léo Le Bouter
2021-03-17 19:11           ` Léo Le Bouter
2021-03-17 21:24             ` zimoun
2021-03-20 11:37     ` Ludovic Courtès
2021-03-21 22:15       ` Léo Le Bouter
2021-03-22  9:55         ` Efraim Flashner
2021-03-22 16:14         ` Ludovic Courtès
2021-03-22 16:45           ` Jack Hill
2021-03-17 17:20   ` Léo Le Bouter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210312005915.14100-4-lle-bout@zaclys.net \
    --to=guix-patches@gnu.org \
    --cc=47081@debbugs.gnu.org \
    --cc=lle-bout@zaclys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.