From 4aaeb6303982b882c9de676e7bdade1710aa24a6 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 17 Dec 2016 11:40:38 +0200 Subject: [PATCH] - More tests. --- tests/test_mysql.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_mysql.py b/tests/test_mysql.py index 92cc19d..9ca0416 100644 --- a/tests/test_mysql.py +++ b/tests/test_mysql.py @@ -25,11 +25,14 @@ def test_mysql_admin_account(Command, Sudo): def test_mysql_backup_job(Command, Sudo): - pass + with Sudo('nobody'): + 'mysql-backup' in Command('crontab -l').stdout def test_mysql_backup_account(Command, Sudo): - pass + with Sudo(): + 'localhost' in Command( + '''mysql --defaults-file=/etc/mysql/debian.cnf --database mysql --execute 'select Host from user where User="backup"' ''').stdout # noqa: E501 def test_mysql_backup_config(File): @@ -37,6 +40,7 @@ def test_mysql_backup_config(File): assert backup_config.user == 'nobody' assert backup_config.group == 'nogroup' assert backup_config.mode == 0o0400 + assert backup_config.contains('user = backup') def test_mysql_backup_directory(File): -- GitLab