1import ./make-test.nix ({ pkgs, ...} : {
2 name = "mysql";
3 meta = with pkgs.stdenv.lib.maintainers; {
4 maintainers = [ eelco chaoflow shlevy ];
5 };
6
7 nodes = {
8 master =
9 { pkgs, ... }:
10
11 {
12 services.mysql.enable = true;
13 services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
14 services.mysql.package = pkgs.mysql;
15 };
16 };
17
18 testScript = ''
19 startAll;
20
21 $master->waitForUnit("mysql");
22 $master->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
23 '';
24})