Commit 929bd84a authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify the test.

Reusing existing code made test unreadable. For now the only safe way to know
what is going on is to just define what shall be done.
parent aa646d72
...@@ -7623,12 +7623,42 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7623,12 +7623,42 @@ class TestVifibSlapWebService(testVifibMixin):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepStoreCurrentSoftwareInstanceUidBufferA(self, sequence, **kw):
sequence['buffer_a_software_instance_uid'] = sequence['software_instance_uid']
def stepStoreCurrentSoftwareInstanceUidBufferB(self, sequence, **kw):
sequence['buffer_b_software_instance_uid'] = sequence['software_instance_uid']
def stepStoreCurrentComputerUidBufferA(self, sequence, **kw):
sequence['buffer_a_computer_uid'] = sequence['computer_uid']
def stepStoreCurrentComputerUidBufferB(self, sequence, **kw):
sequence['buffer_b_computer_uid'] = sequence['computer_uid']
def stepRestoreSoftwareInstanceUidFromBufferA(self, sequence, **kw):
sequence['software_instance_uid_uid'] = sequence['buffer_a_software_instance_uid']
def stepRestoreSoftwareInstanceUidFromBufferB(self, sequence, **kw):
sequence['software_instance_uid_uid'] = sequence['buffer_b_software_instance_uid']
def stepRestoreComputerUidFromBufferA(self, sequence, **kw):
sequence['computer_uid'] = sequence['buffer_a_computer_uid']
def stepRestoreComputerUidFromBufferB(self, sequence, **kw):
sequence['computer_uid'] = sequence['buffer_b_computer_uid']
def stepStoreCurrentComputerReferenceBufferA(self, sequence, **kw): def stepStoreCurrentComputerReferenceBufferA(self, sequence, **kw):
sequence['buffer_a_computer_reference'] = sequence['computer_reference'] sequence['buffer_a_computer_reference'] = sequence['computer_reference']
def stepStoreCurrentComputerReferenceBufferB(self, sequence, **kw): def stepStoreCurrentComputerReferenceBufferB(self, sequence, **kw):
sequence['buffer_b_computer_reference'] = sequence['computer_reference'] sequence['buffer_b_computer_reference'] = sequence['computer_reference']
def stepStoreCurrentComputerPartitionUidBufferA(self, sequence, **kw):
sequence['buffer_a_computer_partition_uid'] = sequence['computer_partition_uid']
def stepStoreCurrentComputerPartitionUidBufferB(self, sequence, **kw):
sequence['buffer_b_computer_partition_uid'] = sequence['computer_partition_uid']
def stepStoreCurrentComputerPartitionReferenceBufferA(self, sequence, **kw): def stepStoreCurrentComputerPartitionReferenceBufferA(self, sequence, **kw):
sequence['buffer_a_computer_partition_reference'] = sequence['computer_partition_reference'] sequence['buffer_a_computer_partition_reference'] = sequence['computer_partition_reference']
...@@ -7641,6 +7671,12 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7641,6 +7671,12 @@ class TestVifibSlapWebService(testVifibMixin):
def stepRestoreComputerReferenceFromBufferB(self, sequence, **kw): def stepRestoreComputerReferenceFromBufferB(self, sequence, **kw):
sequence['computer_reference'] = sequence['buffer_b_computer_reference'] sequence['computer_reference'] = sequence['buffer_b_computer_reference']
def stepRestoreComputerPartitionUidFromBufferA(self, sequence, **kw):
sequence['computer_partition_uid'] = sequence['buffer_a_computer_partition_uid']
def stepRestoreComputerPartitionUidFromBufferB(self, sequence, **kw):
sequence['computer_partition_uid'] = sequence['buffer_b_computer_partition_uid']
def stepRestoreComputerPartitionReferenceFromBufferA(self, sequence, **kw): def stepRestoreComputerPartitionReferenceFromBufferA(self, sequence, **kw):
sequence['computer_partition_reference'] = sequence['buffer_a_computer_partition_reference'] sequence['computer_partition_reference'] = sequence['buffer_a_computer_partition_reference']
...@@ -7654,29 +7690,93 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7654,29 +7690,93 @@ class TestVifibSlapWebService(testVifibMixin):
shall be possible to sucesfully destroy it. shall be possible to sucesfully destroy it.
""" """
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + \ sequence_string = """
""" # Prepare software release shared by both Computers
LoginTestVifibDeveloper
SelectNewSoftwareReleaseUri
CreateSoftwareRelease
Tic
SubmitSoftwareRelease
Tic
CreateSoftwareProduct
Tic
ValidateSoftwareProduct
Tic
SetSoftwareProductToSoftwareRelease
PublishByActionSoftwareRelease
Logout
# Create first computer
LoginTestVifibAdmin
CreateComputer
Tic
Logout
SlapLoginCurrentComputer
FormatComputer
Tic
SlapLogout
StoreCurrentComputerReferenceBufferA StoreCurrentComputerReferenceBufferA
StoreCurrentComputerUidBufferA
# Install software on first computer
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable
Tic
SlapLogout
# Now request and instantiate this software release on first computer
LoginTestVifibCustomer
PersonRequestSoftwareInstance
Tic
Logout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
Logout
StoreCurrentComputerPartitionReferenceBufferA StoreCurrentComputerPartitionReferenceBufferA
""" + \ StoreCurrentComputerPartitionUidBufferA
self.prepare_formated_computer + \ StoreCurrentSoftwareInstanceUidBufferA
"""
LoginDefaultUser
CheckComputerPartitionInstanceSetupSalePackingListConfirmed
Logout
# Now prepare second computer
LoginTestVifibAdmin
CreateComputer
Tic
Logout
SlapLoginCurrentComputer
FormatComputer
Tic
SlapLogout
StoreCurrentComputerReferenceBufferB StoreCurrentComputerReferenceBufferB
StoreCurrentComputerPartitionReferenceBufferB StoreCurrentComputerUidBufferB
LoginTestVifibAdmin LoginTestVifibAdmin
RequestSoftwareInstallation RequestSoftwareInstallation
Tic Tic
Logout Logout
SlapLoginCurrentComputer SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable ComputerSoftwareReleaseAvailable
Tic Tic
SlapLogout SlapLogout
StoreCurrentComputerReferenceBufferB
StoreCurrentComputerUidBufferB
# Now request self software release from one computer to another
RestoreComputerReferenceFromBufferA RestoreComputerReferenceFromBufferA
RestoreComputerPartitionReferenceFromBufferA RestoreComputerUidFromBufferA
RestoreSoftwareInstanceUidFromBufferA
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotReadyResponse RequestComputerPartitionNotReadyResponse
Tic Tic
...@@ -7702,41 +7802,15 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7702,41 +7802,15 @@ class TestVifibSlapWebService(testVifibMixin):
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
Logout Logout
RestoreComputerReferenceFromBufferB StoreCurrentComputerPartitionReferenceBufferB
RestoreComputerPartitionReferenceFromBufferB StoreCurrentComputerPartitionUidBufferB
StoreCurrentSoftwareInstanceUidBufferB
SlapLoginCurrentComputer
SoftwareInstanceBuilding
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceSetupSalePackingListStarted
Logout
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceSetupSalePackingListStopped
CheckComputerPartitionInstanceHostingSalePackingListConfirmed
Logout
SlapLoginCurrentComputer # Now request destruction of second software instance
SoftwareInstanceStarted RestoreComputerReferenceFromBufferB
Tic RestoreComputerUidFromBufferB
SlapLogout
LoginDefaultUser LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStarted
SetCurrentSoftwareInstanceRequester
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
Logout
LoginTestVifibCustomer
RequestSoftwareInstanceDestroy RequestSoftwareInstanceDestroy
Tic Tic
Logout Logout
...@@ -7745,9 +7819,6 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -7745,9 +7819,6 @@ class TestVifibSlapWebService(testVifibMixin):
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
Logout Logout
RestoreComputerReferenceFromBufferA
RestoreComputerPartitionReferenceFromBufferA
SlapLoginCurrentComputer SlapLoginCurrentComputer
SoftwareInstanceDestroyed SoftwareInstanceDestroyed
Tic Tic
......
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