Test monitoring after sanoid cron

This commit is contained in:
Aaron Whitehouse 2022-03-17 22:22:39 +00:00
parent 867b755bb1
commit 02aedfaaa2
1 changed files with 4 additions and 4 deletions

View File

@ -64,10 +64,10 @@ class TestsWithZpool(unittest.TestCase):
self.assertEqual(return_info.returncode, 2)
# Run sanoid and test again
# run_sanoid_cron_command()
# return_info = monitor_snapshots_command()
# self.assertEqual(return_info.stdout, b"CRIT: sanoid-test-1 has no daily snapshots at all!, CRIT: sanoid-test-1 has no hourly snapshots at all!, CRIT: sanoid-test-1 has no monthly snapshots at all!, CRIT: sanoid-test-2 has no daily snapshots at all!, CRIT: sanoid-test-2 has no hourly snapshots at all!, CRIT: sanoid-test-2 has no monthly snapshots at all!\n")
# self.assertEqual(return_info.returncode, 2)
run_sanoid_cron_command()
return_info = monitor_snapshots_command()
self.assertEqual(return_info.stdout, b"CRIT: sanoid-test-1 has no daily snapshots at all!, CRIT: sanoid-test-1 has no hourly snapshots at all!, CRIT: sanoid-test-1 has no monthly snapshots at all!, CRIT: sanoid-test-2 has no daily snapshots at all!, CRIT: sanoid-test-2 has no hourly snapshots at all!, CRIT: sanoid-test-2 has no monthly snapshots at all!\n")
self.assertEqual(return_info.returncode, 2)
# return_info = monitor_snapshots_command()
# self.assertEqual(return_info.stdout, b"CRIT: sanoid-test-1 has no daily snapshots at all!, CRIT: sanoid-test-1 has no hourly snapshots at all!, CRIT: sanoid-test-1 has no monthly snapshots at all!, CRIT: sanoid-test-2 has no daily snapshots at all!, CRIT: sanoid-test-2 has no hourly snapshots at all!, CRIT: sanoid-test-2 has no monthly snapshots at all!\n")