Commit 596fd444 authored by Jérome Perrin's avatar Jérome Perrin

caddy-frontend/test: update to new snapshot API

Adjust `self._cleanup` to new signature from slapos.core!156

/reviewed-on !677
parent 23c32192
...@@ -534,7 +534,7 @@ class SlaveHttpFrontendTestCase(SlapOSInstanceTestCase): ...@@ -534,7 +534,7 @@ class SlaveHttpFrontendTestCase(SlapOSInstanceTestCase):
cls.startServerProcess() cls.startServerProcess()
except BaseException: except BaseException:
cls.logger.exception("Error during setUpClass") cls.logger.exception("Error during setUpClass")
cls._cleanup() cls._cleanup('setUpClass')
cls.setUp = lambda self: self.fail('Setup Class failed.') cls.setUp = lambda self: self.fail('Setup Class failed.')
raise raise
...@@ -559,8 +559,7 @@ class SlaveHttpFrontendTestCase(SlapOSInstanceTestCase): ...@@ -559,8 +559,7 @@ class SlaveHttpFrontendTestCase(SlapOSInstanceTestCase):
cls.waitForCaddy() cls.waitForCaddy()
except BaseException: except BaseException:
cls.logger.exception("Error during setUpClass") cls.logger.exception("Error during setUpClass")
cls._storeSnapshot("{}.setUpClass".format(cls.__name__)) cls._cleanup('setUpClass')
cls._cleanup()
cls.setUp = lambda self: self.fail('Setup Class failed.') cls.setUp = lambda self: self.fail('Setup Class failed.')
raise raise
...@@ -854,9 +853,9 @@ class SlaveHttpFrontendTestCase(SlapOSInstanceTestCase): ...@@ -854,9 +853,9 @@ class SlaveHttpFrontendTestCase(SlapOSInstanceTestCase):
break break
@classmethod @classmethod
def _cleanup(cls): def _cleanup(cls, snapshot_name):
cls.stopServerProcess() cls.stopServerProcess()
super(SlaveHttpFrontendTestCase, cls)._cleanup() super(SlaveHttpFrontendTestCase, cls)._cleanup(snapshot_name)
def patchRequests(self): def patchRequests(self):
HTTPResponse = requests.packages.urllib3.response.HTTPResponse HTTPResponse = requests.packages.urllib3.response.HTTPResponse
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment