nixpkgs-suyu/tests/mysql.nix
Sander van der Burg c630e52873 Added MySQL replication support + 2 MySQL testcases (including replication)
svn path=/nixos/trunk/; revision=27771
2011-07-13 20:58:48 +00:00

22 lines
509 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->waitForJob("mysql");
$master->sleep(10); # Hopefully this is long enough!!
$master->mustSucceed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
'';
}