Move all of NixOS to nixos/ in preparation of the repository merge
This commit is contained in:
22
nixos/tests/mysql.nix
Normal file
22
nixos/tests/mysql.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ 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");
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user