nixpkgs/nixos/tests/mysql.nix

25 lines
559 B
Nix
Raw Normal View History

import ./make-test.nix ({ pkgs, ...} : {
2014-06-28 14:04:49 +00:00
name = "mysql";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco shlevy ];
};
nodes = {
master =
{ pkgs, ... }:
{
services.mysql.enable = true;
2014-02-28 15:16:57 +00:00
services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
2014-02-28 11:16:57 +00:00
services.mysql.package = pkgs.mysql;
};
};
testScript = ''
startAll;
$master->waitForUnit("mysql");
$master->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
'';
})