From fea3bd23104889ecf2f27018a3d6b83f8837ace0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 13 Jan 2020 10:12:27 +0100 Subject: [PATCH] testing/testcase: include partition dump when setup class fail Sometimes instanciation fail because some service do not start and the "check port listening" promises fail. In this case, it's very important to also have the partition content to see what's in the log files. /reviewed-on https://lab.nexedi.com/nexedi/slapos.core/merge_requests/175 --- slapos/testing/testcase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slapos/testing/testcase.py b/slapos/testing/testcase.py index c9fecb7ac..49df6d0b3 100644 --- a/slapos/testing/testcase.py +++ b/slapos/testing/testcase.py @@ -434,7 +434,7 @@ class SlapOSInstanceTestCase(unittest.TestCase): @classmethod def _storeSystemSnapshot(cls, name): - """Store a snapshot of standalone slapos + """Store a snapshot of standalone slapos and partitions. Does not include software log, because this is stored at the end of software installation and software log is large. @@ -450,6 +450,7 @@ class SlapOSInstanceTestCase(unittest.TestCase): cls._copySnapshot(standalone_log, name) # store slapproxy database cls._copySnapshot(cls.slap._proxy_database, name) + cls._storePartitionSnapshot(name) def tearDown(self): self._storePartitionSnapshot(self.id()) -- 2.30.9