mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
b5c1deca8a
He prefers to contribute to his own nixpkgs fork triton. Since he is still marked as maintainer in many packages this leaves the wrong impression he still maintains those.
35 lines
877 B
Nix
35 lines
877 B
Nix
# This test start mongodb, runs a query using mongo shell
|
|
|
|
import ./make-test.nix ({ pkgs, ...} : let
|
|
testQuery = pkgs.writeScript "nixtest.js" ''
|
|
db.greetings.insert({ "greeting": "hello" });
|
|
print(db.greetings.findOne().greeting);
|
|
'';
|
|
in {
|
|
name = "mongodb";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ bluescreen303 offline cstrahan rvl ];
|
|
};
|
|
|
|
nodes = {
|
|
one =
|
|
{ ... }:
|
|
{
|
|
services = {
|
|
mongodb.enable = true;
|
|
mongodb.extraConfig = ''
|
|
# Allow starting engine with only a small virtual disk
|
|
storage.journal.enabled: false
|
|
storage.mmapv1.smallFiles: true
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
startAll;
|
|
$one->waitForUnit("mongodb.service");
|
|
$one->succeed("mongo nixtest ${testQuery}") =~ /hello/ or die;
|
|
'';
|
|
})
|