This patch fixes the test suite to allow any order when listing the members of a JSON object. Aeson (being true to the JSON specification) does not specify an order for objects. In practice, the order depends on your processor architecture. See for a discussion resulting in a similar patch fixing the Aeson tests. See for the upstream bug report. diff -ruN a/test/Test.hs b/test/Test.hs --- a/test/Test.hs 2018-12-31 15:10:50.000000000 -0500 +++ b/test/Test.hs 2019-11-08 01:34:07.419706831 -0500 @@ -48,8 +48,10 @@ , testCase "" $ ("{\"a\": {}, \"b\": null}" ^? key (T.pack "b") . _Object) @?= Nothing , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? key (T.pack "a")) @?= Just (Number 100.0) , testCase "" $ ("[1,2,3]" ^? key (T.pack "a")) @?= Nothing - , testCase "" $ ("{\"a\": 4, \"b\": 7}" ^.. members) @?= [Number 4.0,Number 7.0] - , testCase "" $ ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10)) @?= "{\"a\":40,\"b\":70}" + , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" ^.. members) + in x == [Number 4.0,Number 7.0] || x == [Number 7.0,Number 4.0]) + , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10)) + in x == "{\"a\":40,\"b\":70}" || x == "{\"b\":70,\"a\":40}") , testCase "" $ ("[1,2,3]" ^? nth 1) @?= Just (Number 2.0) , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? nth 1) @?= Nothing , testCase "" $ ("[1,2,3]" & nth 1 .~ Number 20) @?= "[1,20,3]" e8f7ad5680df703fbe1c068e'/>
AgeCommit message (Expand)Author
2020-02-19gnu: services: Add openvpn options....* gnu/services/vpn.scm (openvpn-client-configuration) (openvpn-server-configuration): Add fast-io? and auth-user-pass options. Julien Lepiller
2020-02-19gnu: services: Fix openvpn boolean fields....* gnu/services/vpn.scm (serialize-boolean): Do not print #t to the file. Julien Lepiller
2017-10-10services: vpn: Fix default tls-auth configuration....* gnu/services/vpn.scm (serialize-tls-auth): Fix serialization error when tls-auth is disabled. Julien Lepiller
2017-03-31doc: Fix typos....* doc/guix.texi (Build Systems)[ocaml-build-system]: Fix typo. (Log Rotation)[periodic-rotations]: ditto. (Database Services)[redis-service-type]: ditto. (OpenSMTPD Service)[opensmtpd-configuration]: ditto. (VPN Services)[OpenVPN]: ditto. (Power management Services)[tlp-configuration]: ditto. (Git daemon service)[git-daemon-service]: ditto. (Running GuixSD in a VM): ditto. * gnu/services/pm.scm (tlp-configuration)[runtime-pm-blacklist]: Fix typo. * gnu/services/vpn.scm (openvpn-client-configuration)[status]: ditto. Eric Bavier
2017-03-24services: openvpn: Fix a typo which was corrected in generated doc....* gnu/services/vpn.scm (define-split-configuration): Fix typo. Signed-off-by: Clément Lassieur <clement@lassieur.org> Mathieu Othacehe
2017-01-25services: Fix 'mkdir-p' in activation scripts....* gnu/services/cups.scm (%cups-activation): Import (guix build utils). * gnu/services/mail.scm (opensmtpd-activation): Idem. * gnu/services/networking.scm (ntp-service-activation): Idem. * gnu/services/spice.scm (spice-vdagent-activation): Idem. * gnu/services/ssh.scm (openssh-activation): Idem. (dropbear-activation): Idem. * gnu/services/vpn.scm (%openvpn-activation): Idem. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Clément Lassieur
2017-01-20services: Reindent vpn.scm....This fixes indentation of 'match' forms. * gnu/services/vpn.scm: Pass through 'indent-code.el'. Ludovic Courtès
2017-01-15gnu: Add openvpn service....* gnu/services/vpn.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (VPN Services): New section. Julien Lepiller