mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 08:01:14 +00:00
5b468ea6b1
1) Change start-type to ```notify``` when running MariaDB so that we don't have to busy-wait for the socket to appear. 2) Do not manually create the directory under /run as we can get systemd to do that for us. This opens up the possibility later for not having to launch as root.
25 lines
576 B
Nix
25 lines
576 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->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
|
|
'';
|
|
})
|