Commit cfe9b87b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_configurator: Fix test by invoking fixConsistency

  The afterSetup modifies the certificate_authority_path in order to allow us to
  do parallel tests, invoke fixConsistency restore the original value expected
  and set by the configurator.
parent c41798ce
...@@ -48,6 +48,10 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -48,6 +48,10 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
invoking checkConsistency. invoking checkConsistency.
Make sure PAS is well configured.""" Make sure PAS is well configured."""
# The certificate_authority_path is modified by the setup, invoke
# fixConsistency here to restore it like the originally expected.
self.portal.portal_certificate_authority.fixConsistency()
self.assertEqual(self.portal.portal_certificate_authority.checkConsistency(), []) self.assertEqual(self.portal.portal_certificate_authority.checkConsistency(), [])
def testConfiguredTemplateToolViaConstraint(self): def testConfiguredTemplateToolViaConstraint(self):
...@@ -116,6 +120,10 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -116,6 +120,10 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
# expected, nothing else, and if alamrs were invoked. # expected, nothing else, and if alamrs were invoked.
return return
# The certificate_authority_path is modified by the setup, invoke
# fixConsistency here to restore it like the originally expected.
self.portal.portal_certificate_authority.fixConsistency()
self.assertTrue(self.portal.hasObject('portal_certificate_authority')) self.assertTrue(self.portal.hasObject('portal_certificate_authority'))
self.assertEqual(os.environ['TEST_CA_PATH'], self.assertEqual(os.environ['TEST_CA_PATH'],
self.portal.portal_certificate_authority.certificate_authority_path) self.portal.portal_certificate_authority.certificate_authority_path)
......
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