diff options
author | Léo Le Bouter <lle-bout@zaclys.net> | 2021-03-12 01:59:10 +0100 |
---|---|---|
committer | Léo Le Bouter <lle-bout@zaclys.net> | 2021-03-16 11:05:24 +0100 |
commit | 097cf21d1d34f4f66a403c3fb6e15b6709c4dd8a (patch) | |
tree | 1e896839fdb3d2e61f38e3cede3e77d99f979140 /gnu/tests | |
parent | 0ee5d4f7a8e25be437297f88ed7013c4f37abafb (diff) | |
download | guix-097cf21d1d34f4f66a403c3fb6e15b6709c4dd8a.tar.gz |
gnu: Remove MongoDB.
mongodb 3.4.10 has unpatched CVEs and mongodb 3.4.24 has some files in the release tarball under the SSPL, therefore we cannot provide mongodb while upholding to good security standards. It turns out feff80cec3c97a3df2c20d300be12d67f79d4f22 was right since while the main license file wasnt altered to SSPL, some files in the tree contain SSPL headers. * gnu/packages/databases.scm (go-gopkg.in-mgo.v2): Remove. * gnu/packages/databases.scm (mongo-tools): Remove. * doc/guix.texi (mongodb-service-type): Remove. * gnu/tests/databases.scm (%test-mongodb, %mongodb-os, run-mongodb-test): Remove. * gnu/services/databases.scm (mongodb-configuration, mongodb-configuration?, mongodb-configuration-mongodb, mongodb-configuration-config-file, mongodb-configuration-data-directory, mongodb-service-type, %default-mongodb-configuration-file, %mongodb-accounts, mongodb-activation, mongodb-shepherd-service): Remove. * gnu/packages/databases.scm (mongodb): Remove.
Diffstat (limited to 'gnu/tests')
-rw-r--r-- | gnu/tests/databases.scm | 83 |
1 files changed, 0 insertions, 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)))) - ;;; ;;; The PostgreSQL service. |