Commit 0cbb47fa authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

software/theia: fix resiliency test after upgrade to slapos.core 1.12.0

After the change in https://lab.nexedi.com/nexedi/slapos.core/-/blob/2b80692d62b3dbd9e67d70d6143f180fc2f155fc/slapos/util.py#L449-453, there is now a KeyError message if the serialisation is not found. The theia test was actively checking there is no "Error" in the output log hence it was now failing.

Allow just this specific error.
parent 42083eea
...@@ -498,7 +498,8 @@ class TakeoverMixin(ExportAndImportMixin): ...@@ -498,7 +498,8 @@ class TakeoverMixin(ExportAndImportMixin):
def _requestTakeover(self, takeover_url, takeover_password): def _requestTakeover(self, takeover_url, takeover_password):
resp = requests.get("%s?password=%s" % (takeover_url, takeover_password), verify=True) resp = requests.get("%s?password=%s" % (takeover_url, takeover_password), verify=True)
self.assertEqual(requests.codes.ok, resp.status_code) self.assertEqual(requests.codes.ok, resp.status_code)
self.assertNotIn("Error", resp.text, "An Error occured: %s" % resp.text) # Allow KeyError because of stricter "slapos request" command
self.assertNotIn("Error", resp.text.replace("KeyError: \\'frozen\\'", ""), "An Error occured: %s" % resp.text)
self.assertIn("Success", resp.text, "An Error occured: %s" % resp.text) self.assertIn("Success", resp.text, "An Error occured: %s" % resp.text)
return resp.text return resp.text
......
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