1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/nixos/tests/mysql.nix

27 lines
686 B
Nix
Raw Normal View History

import ./make-test.nix ({ pkgs, ...} : {
2014-06-28 15:04:49 +01:00
name = "mysql";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco chaoflow shlevy ];
};
nodes = {
master =
{ pkgs, config, ... }:
{
services.mysql.enable = true;
2014-02-28 15:16:57 +00:00
services.mysql.replication.role = "master";
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->sleep(10); # Hopefully this is long enough!!
$master->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
'';
})