From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnOjb-0003fM-Lc for guix-patches@gnu.org; Thu, 31 Aug 2017 08:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnOjS-000393-CA for guix-patches@gnu.org; Thu, 31 Aug 2017 08:38:11 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55957) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnOjS-00038S-8n for guix-patches@gnu.org; Thu, 31 Aug 2017 08:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dnOjR-00067B-Vl for guix-patches@gnu.org; Thu, 31 Aug 2017 08:38:02 -0400 Subject: [bug#28198] [PATCH 4/4] tests: databases: Add MongoDB test. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170823092516.6846-1-mail@cbaines.net> <20170823092516.6846-4-mail@cbaines.net> Date: Thu, 31 Aug 2017 14:37:45 +0200 In-Reply-To: <20170823092516.6846-4-mail@cbaines.net> (Christopher Baines's message of "Wed, 23 Aug 2017 10:25:16 +0100") Message-ID: <87h8wnud46.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 28198@debbugs.gnu.org Christopher Baines skribis: > * gnu/tests/databases.scm (%test-mongodb): New variable. FWIW I=E2=80=99d suggest squashing it with the patch that adds the MongoDB service, since they really go together. > +(define %mongodb-os > + (operating-system > + (inherit > + (simple-operating-system > + (dhcp-client-service) > + (service mongodb-service-type) > + (extra-special-file "/etc/os-release" > + (plain-file "os-release" "guix\n")))) Does it require that =E2=80=98os-release=E2=80=99 file? If so, should the = service add it? That would probably intrusive though, so it=E2=80=99s even better if MongoDB does not require it. > + (test-eq "can connect" > + 0 > + (system* (string-append #$mongodb "/bin/mongo") > + "test" > + "--eval" > + "help")) If it=E2=80=99s easy to do through the CLI, it might be worth trying insert= an element and query it. > +%mongodb-os Leftover. Otherwise LGTM, thank you! Ludo=E2=80=99.