3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/tests/mysql.nix
2012-10-24 18:22:53 +02:00

23 lines
489 B
Nix

{ pkgs, ... }:
{
nodes = {
master =
{ pkgs, config, ... }:
{
services.mysql.enable = true;
services.mysql.replication.role = "master";
services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
};
};
testScript = ''
startAll;
$master->waitForUnit("mysql");
$master->sleep(10); # Hopefully this is long enough!!
$master->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
'';
}