[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28198] [PATCH 4/4] tests: databases: Add MongoDB test.
From: |
Ludovic Courtès |
Subject: |
[bug#28198] [PATCH 4/4] tests: databases: Add MongoDB test. |
Date: |
Thu, 31 Aug 2017 14:37:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Christopher Baines <address@hidden> skribis:
> * gnu/tests/databases.scm (%test-mongodb): New variable.
FWIW I’d 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 ‘os-release’ file? If so, should the service add
it? That would probably intrusive though, so it’s even better if
MongoDB does not require it.
> + (test-eq "can connect"
> + 0
> + (system* (string-append #$mongodb "/bin/mongo")
> + "test"
> + "--eval"
> + "help"))
If it’s 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’.