Module: check_mk
Branch: master
Commit: 314582bc3c1acba44da5d64ff9a115e7ab992bea
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=314582bc3c1acb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 21 13:50:35 2019 +0100
Add test debug code
Change-Id: I552b857b1e6f4d0d6e64f6e70ff9a3df8c04b3c5
---
tests/integration/bin/test_mkbackup.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/integration/bin/test_mkbackup.py
b/tests/integration/bin/test_mkbackup.py
index a3f0dfa..c264cb6 100644
--- a/tests/integration/bin/test_mkbackup.py
+++ b/tests/integration/bin/test_mkbackup.py
@@ -4,6 +4,7 @@ import subprocess
import re
import os
import tarfile
+import time
import fnmatch
import fasteners
import pytest # type: ignore
@@ -129,12 +130,19 @@ def _execute_backup(site, job_id="testjob"):
def _execute_restore(site, backup_id, env=None):
with BackupLock():
+ os.system("ps -ef")
+ os.system("mount")
+ os.system("ps -U %s" % site.id)
p = site.execute(["mkbackup", "restore",
"test-target", backup_id],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=env)
stdout, stderr = p.communicate()
- assert "Restore completed" in stdout, "Invalid output: %r" %
stdout
+ try:
+ assert "Restore completed" in stdout, "Invalid output:
%r" % stdout
+ except AssertionError:
+ time.sleep(1000)
+ raise
assert stderr == ""
assert p.wait() == 0