mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
c38e6a2a60
Eliminate race condition in replication test Remove replication configuration from standalone test Improve mysql command syntax consistency
26 lines
634 B
Nix
26 lines
634 B
Nix
import ./make-test.nix ({ pkgs, ...} : {
|
|
name = "mysql";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ eelco chaoflow shlevy ];
|
|
};
|
|
|
|
nodes = {
|
|
master =
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
|
services.mysql.enable = true;
|
|
services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
|
|
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");
|
|
'';
|
|
})
|