Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Very many rebuilds from master :-(
- Loading branch information
Showing
52 changed files
with
638 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Test whether mysqlBackup option works | ||
import ./make-test.nix ({ pkgs, ... } : { | ||
name = "mysql-backup"; | ||
meta = with pkgs.stdenv.lib.maintainers; { | ||
maintainers = [ rvl ]; | ||
}; | ||
|
||
nodes = { | ||
master = { config, pkgs, ... }: { | ||
services.mysql = { | ||
enable = true; | ||
initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ]; | ||
package = pkgs.mysql; | ||
}; | ||
|
||
services.mysqlBackup = { | ||
enable = true; | ||
databases = [ "doesnotexist" "testdb" ]; | ||
}; | ||
}; | ||
}; | ||
|
||
testScript = | ||
'' startAll; | ||
# Need to have mysql started so that it can be populated with data. | ||
$master->waitForUnit("mysql.service"); | ||
# Wait for testdb to be populated. | ||
$master->sleep(10); | ||
# Do a backup and wait for it to finish. | ||
$master->startJob("mysql-backup.service"); | ||
$master->waitForJob("mysql-backup.service"); | ||
# Check that data appears in backup | ||
$master->succeed("${pkgs.gzip}/bin/zcat /var/backup/mysql/testdb.gz | grep hello"); | ||
# Check that a failed backup is logged | ||
$master->succeed("journalctl -u mysql-backup.service | grep 'fail.*doesnotexist' > /dev/null"); | ||
''; | ||
}) |
Oops, something went wrong.