Commit d60fbe59 authored by Łukasz Nowak's avatar Łukasz Nowak

Finalise the test.

The order of steps is important in order to trigger underlying bug.
parent 929bd84a
...@@ -3103,6 +3103,11 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -3103,6 +3103,11 @@ class TestVifibSlapWebService(testVifibMixin):
def stepCheckSoftwareInstanceAndRelatedComputerPartition(self, def stepCheckSoftwareInstanceAndRelatedComputerPartition(self,
sequence, **kw): sequence, **kw):
self.stepCheckSoftwareInstanceAndRelatedComputerPartitionNoPackingList(sequence, **kw)
self._checkSoftwareInstanceAndRelatedPartition(software_instance)
def stepCheckSoftwareInstanceAndRelatedComputerPartitionNoPackingListCheck(self,
sequence, **kw):
software_instance_uid = sequence['software_instance_uid'] software_instance_uid = sequence['software_instance_uid']
software_instance = self.portal.portal_catalog.getResultValue( software_instance = self.portal.portal_catalog.getResultValue(
uid=software_instance_uid) uid=software_instance_uid)
...@@ -3110,7 +3115,6 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -3110,7 +3115,6 @@ class TestVifibSlapWebService(testVifibMixin):
predecessor_value_list = software_instance.getPredecessorValueList() predecessor_value_list = software_instance.getPredecessorValueList()
self.assertEqual(1, len(predecessor_value_list)) self.assertEqual(1, len(predecessor_value_list))
self._checkSoftwareInstanceAndRelatedPartition(software_instance)
sequence.edit( sequence.edit(
requested_software_instance_uid=predecessor_value_list[0].getUid(), requested_software_instance_uid=predecessor_value_list[0].getUid(),
requested_software_instance_reference=predecessor_value_list[0].getReference()) requested_software_instance_reference=predecessor_value_list[0].getReference())
...@@ -7636,10 +7640,10 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7636,10 +7640,10 @@ class TestVifibSlapWebService(testVifibMixin):
sequence['buffer_b_computer_uid'] = sequence['computer_uid'] sequence['buffer_b_computer_uid'] = sequence['computer_uid']
def stepRestoreSoftwareInstanceUidFromBufferA(self, sequence, **kw): def stepRestoreSoftwareInstanceUidFromBufferA(self, sequence, **kw):
sequence['software_instance_uid_uid'] = sequence['buffer_a_software_instance_uid'] sequence['software_instance_uid'] = sequence['buffer_a_software_instance_uid']
def stepRestoreSoftwareInstanceUidFromBufferB(self, sequence, **kw): def stepRestoreSoftwareInstanceUidFromBufferB(self, sequence, **kw):
sequence['software_instance_uid_uid'] = sequence['buffer_b_software_instance_uid'] sequence['software_instance_uid'] = sequence['buffer_b_software_instance_uid']
def stepRestoreComputerUidFromBufferA(self, sequence, **kw): def stepRestoreComputerUidFromBufferA(self, sequence, **kw):
sequence['computer_uid'] = sequence['buffer_a_computer_uid'] sequence['computer_uid'] = sequence['buffer_a_computer_uid']
...@@ -7688,6 +7692,10 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7688,6 +7692,10 @@ class TestVifibSlapWebService(testVifibMixin):
If software instance originated on computer comes from another computer it If software instance originated on computer comes from another computer it
shall be possible to sucesfully destroy it. shall be possible to sucesfully destroy it.
Test is done in a way to trigger unstable Assignor role calculation
on Hosting Subscription which leads to unavailability of Software Instances
from one computer to another.
""" """
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = """ sequence_string = """
...@@ -7728,7 +7736,6 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7728,7 +7736,6 @@ class TestVifibSlapWebService(testVifibMixin):
Tic Tic
SlapLogout SlapLogout
# Now request and instantiate this software release on first computer # Now request and instantiate this software release on first computer
LoginTestVifibCustomer LoginTestVifibCustomer
PersonRequestSoftwareInstance PersonRequestSoftwareInstance
...@@ -7749,6 +7756,57 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7749,6 +7756,57 @@ class TestVifibSlapWebService(testVifibMixin):
CheckComputerPartitionInstanceSetupSalePackingListConfirmed CheckComputerPartitionInstanceSetupSalePackingListConfirmed
Logout Logout
# Start it..
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
SlapLogout
LoginDefaultUser
SetSelectedComputerPartition
CheckComputerPartitionInstanceSetupSalePackingListStopped
CheckComputerPartitionInstanceHostingSalePackingListConfirmed
Logout
SlapLoginCurrentComputer
SoftwareInstanceStarted
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStarted
Logout
# ...stop it...
LoginDefaultUser
RequestSoftwareInstanceStop
Tic
Logout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStopped
Logout
SlapLoginCurrentComputer
SoftwareInstanceStopped
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListDelivered
Logout
# ...and request destruction
LoginDefaultUser
RequestSoftwareInstanceDestroy
Tic
Logout
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
Logout
# Now prepare second computer # Now prepare second computer
LoginTestVifibAdmin LoginTestVifibAdmin
...@@ -7788,28 +7846,71 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7788,28 +7846,71 @@ class TestVifibSlapWebService(testVifibMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CheckSoftwareInstanceAndRelatedComputerPartition CheckSoftwareInstanceAndRelatedComputerPartitionNoPackingListCheck
CheckRequestedSoftwareInstanceAndRelatedComputerPartition CheckRequestedSoftwareInstanceAndRelatedComputerPartition
Logout Logout
SlapLoginCurrentSoftwareInstance
CheckRequestedComputerPartitionCleanParameterList
Logout
LoginDefaultUser LoginDefaultUser
SetCurrentSoftwareInstanceRequested SetCurrentSoftwareInstanceRequested
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
Logout Logout
SlapLoginCurrentSoftwareInstance
CheckRequestedComputerPartitionCleanParameterList
Logout
StoreCurrentComputerPartitionReferenceBufferB StoreCurrentComputerPartitionReferenceBufferB
StoreCurrentComputerPartitionUidBufferB StoreCurrentComputerPartitionUidBufferB
StoreCurrentSoftwareInstanceUidBufferB StoreCurrentSoftwareInstanceUidBufferB
# Now request destruction of second software instance
RestoreComputerReferenceFromBufferB RestoreComputerReferenceFromBufferB
RestoreComputerUidFromBufferB RestoreComputerUidFromBufferB
# Start the requested software instance...
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
SlapLogout
LoginDefaultUser
SetSelectedComputerPartition
CheckComputerPartitionInstanceSetupSalePackingListStopped
CheckComputerPartitionInstanceHostingSalePackingListConfirmed
Logout
SlapLoginCurrentComputer
SoftwareInstanceStarted
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStarted
Logout
# ...and stop it
LoginDefaultUser
RequestSoftwareInstanceStop
Tic
Logout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStopped
Logout
SlapLoginCurrentComputer
SoftwareInstanceStopped
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListDelivered
Logout
# Now request destruction of second software instance...
LoginDefaultUser LoginDefaultUser
RequestSoftwareInstanceDestroy RequestSoftwareInstanceDestroy
Tic Tic
...@@ -7819,6 +7920,25 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7819,6 +7920,25 @@ class TestVifibSlapWebService(testVifibMixin):
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
Logout Logout
# ...and destroy it
SlapLoginCurrentComputer
SoftwareInstanceDestroyed
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
CheckComputerPartitionIsFree
Logout
# Time to switch back to first software instance and destroy it
RestoreComputerPartitionReferenceFromBufferA
RestoreComputerPartitionUidFromBufferA
RestoreSoftwareInstanceUidFromBufferA
RestoreComputerReferenceFromBufferA
RestoreComputerUidFromBufferA
SlapLoginCurrentComputer SlapLoginCurrentComputer
SoftwareInstanceDestroyed SoftwareInstanceDestroyed
Tic Tic
...@@ -7831,7 +7951,6 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7831,7 +7951,6 @@ class TestVifibSlapWebService(testVifibMixin):
""" """
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
raise NotImplementedError
######################################## ########################################
# Other tests # Other tests
......
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