From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyCqb-0003sN-F0 for guix-patches@gnu.org; Sat, 30 Sep 2017 04:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyCqY-0001re-A1 for guix-patches@gnu.org; Sat, 30 Sep 2017 04:10:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyCqY-0001ra-6q for guix-patches@gnu.org; Sat, 30 Sep 2017 04:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dyCqX-0000P7-Ui for guix-patches@gnu.org; Sat, 30 Sep 2017 04:10:01 -0400 Subject: [bug#28198] [PATCH 4/4] tests: databases: Add MongoDB test. Resent-Message-ID: Date: Sat, 30 Sep 2017 09:09:41 +0100 From: Christopher Baines Message-ID: <20170930090941.2dbb0543@cbaines.net> In-Reply-To: <87h8wnud46.fsf@gnu.org> References: <20170823092516.6846-1-mail@cbaines.net> <20170823092516.6846-4-mail@cbaines.net> <87h8wnud46.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/=4r8f.z7BeCL.QZ/wt.yYyP"; protocol="application/pgp-signature" 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28198@debbugs.gnu.org --Sig_/=4r8f.z7BeCL.QZ/wt.yYyP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 31 Aug 2017 14:37:45 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Christopher Baines skribis: >=20 > > * gnu/tests/databases.scm (%test-mongodb): New variable. =20 >=20 > FWIW I=E2=80=99d suggest squashing it with the patch that adds the MongoDB > service, since they really go together. Ok, I've merged these patches together now. =20 > > +(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")))) =20 >=20 > Does it require that =E2=80=98os-release=E2=80=99 file? If so, should th= e service add > it? That would probably intrusive though, so it=E2=80=99s even better if > MongoDB does not require it. I think this was me trying to get the tests to pass, but it didn't help, as the mongo client was running outside of the test system. I've now removed it. > > + (test-eq "can connect" > > + 0 > > + (system* (string-append #$mongodb "/bin/mongo") > > + "test" > > + "--eval" > > + "help")) =20 >=20 > If it=E2=80=99s easy to do through the CLI, it might be worth trying inse= rt an > element and query it. I've done this now. Also, I've included a patch from upstream that fixes the crash in the client that was causing the system test to fail, so the test should now pass. > > +%mongodb-os =20 >=20 > Leftover. I've removed this now. > Otherwise LGTM, thank you! Great, thanks for reviewing Ludo :) --Sig_/=4r8f.z7BeCL.QZ/wt.yYyP Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnPUUVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XfqSg//V+/xBwehlUIBFgtEJloVnsWrlx1ylqk5pRkYJLzrCDdvT1DnVMjbhMwU AU0yV7A4fpWli81NXjtK5PI3W/DwAcr41MqC2dsQcB1TJGvE4hgKKyxFprnmUo2D /ku+3M/PWuDxr3TKjZPsO7Imnxr0mpaPcnHf5FZ0BKqS/rHe14aExfKNCT1qBfI6 3b/0SE5WPu0kQ/qUZ9DPsIGikixnOaZbJBuK49pO5x3jP9EodFF6dGWbAyoV50AG WcMtIC6neG4nZd1wIb3ihkLyRD8It2xWwz8TofK1IIdoDdFO2Jo/3gAm6hzovWO8 ZuOvDcLpsvsyP0fNdLY4s3vL0mZu4aL28LF6Ef2mxX5GvvqZBAz3DMiDMRzV6bvl /P5Al7NEy/yzyCdo1SX0lgZtiroyb5lvRim+p5xgzseuypB7n46k0QFpGef934lk Gs0ngWXv8Lxk77MzX80fz2ZSkJAzkofslXgip8abc747D5G+kaaSWoXHnL8vH3k5 bcyTZVMqf6Xko5e4r4LUqgge03jHphGcrW840dzt1S+XHcQu//BCWxQBAd0A7jhW iQj+879stl+A9E8TiyjtiMmGYLnFwfVfFDbJTaF1MN7z1pdOrwHhC8Pmsn3wrWy6 VSvfsIWJvL8wQQJwyKtDq0eAG/o7V4nFdk3YxLhw+Ua+qdh+dNc= =YNGk -----END PGP SIGNATURE----- --Sig_/=4r8f.z7BeCL.QZ/wt.yYyP--