- cmd = ['rm', '-f', constants.WATCHER_STATEFILE]
- AssertEqual(StartSSH(node['primary'],
- utils.ShellQuoteArgs(cmd)).wait(), 0)
+ AssertCommand(["rm", "-f", constants.WATCHER_STATEFILE])
+
+
+def _RunWatcherDaemon():
+ """Runs the ganeti-watcher daemon on the master node.
+
+ """
+ AssertCommand(["ganeti-watcher", "-d", "--ignore-pause"])
+
+
+def TestPauseWatcher():
+ """Tests and pauses the watcher.
+
+ """
+ master = qa_config.GetMasterNode()
+
+ AssertCommand(["gnt-cluster", "watcher", "pause", "4h"])
+
+ cmd = ["gnt-cluster", "watcher", "info"]
+ output = GetCommandOutput(master["primary"],
+ utils.ShellQuoteArgs(cmd))
+ AssertMatch(output, r"^.*\bis paused\b.*")