Commit 5ea5776c authored by Łukasz Nowak's avatar Łukasz Nowak

Avoid testing impossible.

Damaging sla and instance xml is not possible anymore.
parent bc20967a
...@@ -699,51 +699,12 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin ...@@ -699,51 +699,12 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepSetSoftwareInstanceValidConnectionXML(self, sequence, **kw):
software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
software_instance.edit(connection_xml="")
def stepDamageSoftwareInstanceSlaXml(self, sequence, **kw):
instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
if instance.getPortalType() == "Software Instance":
shared = False
elif instance.getPortalType() == "Slave Instance":
shared = True
else:
raise NotImplementedError
self.assertRaises(ValidationFailed, instance.requestStart,
software_release=instance.getRootSoftwareReleaseUrl(),
instance_xml=instance.getTextContent(),
software_type=instance.getSourceReference(),
sla_xml="""DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>""",
shared=shared,
)
def stepDamageSoftwareInstanceConnectionXml(self, sequence, **kw): def stepDamageSoftwareInstanceConnectionXml(self, sequence, **kw):
instance = self.portal.portal_catalog.getResultValue( instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid']) uid=sequence['software_instance_uid'])
instance.edit(connection_xml=""" instance.edit(connection_xml="""
DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>""") DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>""")
def stepDamageSoftwareInstanceXml(self, sequence, **kw):
instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
if instance.getPortalType() == "Software Instance":
shared = False
elif instance.getPortalType() == "Slave Instance":
shared = True
else:
raise NotImplementedError
self.assertRaises(ValidationFailed, instance.requestStart,
software_release=instance.getRootSoftwareReleaseUrl(),
instance_xml="""DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>""",
software_type=instance.getSourceReference(),
sla_xml=instance.getSlaXml(),
shared=shared,
)
def stepCheckDamageSoftwareInstanceSiteConsistency(self, sequence, **kw): def stepCheckDamageSoftwareInstanceSiteConsistency(self, sequence, **kw):
software_instance = self.portal.portal_catalog.getResultValue( software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid']) uid=sequence['software_instance_uid'])
...@@ -756,7 +717,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin ...@@ -756,7 +717,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
consistency_error = consistency_error_list[0] consistency_error = consistency_error_list[0]
self.assertEqual(consistency_error.getObject().getPath(), self.assertEqual(consistency_error.getObject().getPath(),
software_instance.getPath()) software_instance.getPath())
self.assertTrue('Sla XML is invalid' in str(consistency_error.getMessage())) self.assertTrue('Connection XML is invalid' in str(consistency_error.getMessage()))
self.assertTrue(self.portal.portal_alarms.vifib_check_consistency.sense()) self.assertTrue(self.portal.portal_alarms.vifib_check_consistency.sense())
self.checkDivergency() self.checkDivergency()
...@@ -766,15 +727,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin ...@@ -766,15 +727,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self\ sequence_string = self\
.prepare_install_requested_computer_partition_sequence_string + """ .prepare_install_requested_computer_partition_sequence_string + """
LoginDefaultUser
DamageSoftwareInstanceXml
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
Tic
SlapLogout
LoginDefaultUser LoginDefaultUser
SetSoftwareInstanceValidXML SetSoftwareInstanceValidXML
DamageSoftwareInstanceConnectionXml DamageSoftwareInstanceConnectionXml
...@@ -785,16 +737,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin ...@@ -785,16 +737,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser
SetSoftwareInstanceValidConnectionXML
DamageSoftwareInstanceSlaXml
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
Tic
SlapLogout
LoginERP5TypeTestCase LoginERP5TypeTestCase
CheckDamageSoftwareInstanceSiteConsistency CheckDamageSoftwareInstanceSiteConsistency
Logout Logout
......
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