Commit 8fa15d23 authored by Łukasz Nowak's avatar Łukasz Nowak

Check that stopping later works.

Play usual started scenario, and later after it is started, change the decision
and request it stopped.

Also fix docstring.
parent d8484504
......@@ -3587,9 +3587,15 @@ class TestVifibSlapWebService(testVifibMixin):
def stepSetCurrentSoftwareInstanceRequested(self, sequence):
sequence.edit(
requester_software_instance_uid=sequence['software_instance_uid'],
software_instance_uid=sequence['requested_software_instance_uid'],
)
def stepSetCurrentSoftwareInstanceRequester(self, sequence):
sequence.edit(
software_instance_uid=sequence['requester_software_instance_uid']
)
def test_ComputerPartition_request_instantiate(self):
"""
Check that after computer partition is requested it is possible to
......@@ -3660,7 +3666,7 @@ class TestVifibSlapWebService(testVifibMixin):
def test_ComputerPartition_request_instantiate_state_stopped(self):
"""
Check that after computer partition is requested it is possible to
instantiate it and it is started correctly.
instantiate it and it is stopped correctly, as requested initally.
"""
self.computer_partition_amount = 2
sequence_list = SequenceList()
......@@ -3721,6 +3727,94 @@ class TestVifibSlapWebService(testVifibMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_ComputerPartition_request_instantiate_stop_later(self):
"""
Check that after computer partition is requested it is possible to
instantiate it and it is started correctly, and later it is stopped
correctly as requested.
"""
self.computer_partition_amount = 2
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + '\
SlapLoginCurrentSoftwareInstance \
RequestComputerPartitionNotReadyResponse \
Tic \
SlapLogout \
\
SlapLoginCurrentSoftwareInstance \
RequestComputerPartition \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
Logout \
\
SlapLoginCurrentSoftwareInstance \
CheckRequestedComputerPartitionCleanParameterList \
Logout \
\
LoginDefaultUser \
SetCurrentSoftwareInstanceRequested \
SetSelectedComputerPartition \
SelectCurrentlyUsedSalePackingListUid \
Logout \
\
SlapLoginCurrentComputer \
SoftwareInstanceBuilding \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceSetupSalePackingListStarted \
Logout \
\
SlapLoginCurrentComputer \
SoftwareInstanceAvailable \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceSetupSalePackingListStopped \
CheckComputerPartitionInstanceHostingSalePackingListConfirmed \
Logout \
\
SlapLoginCurrentComputer \
SoftwareInstanceStarted \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceHostingSalePackingListStarted \
Logout \
\
SetInstanceStateStopped \
\
SetCurrentSoftwareInstanceRequester \
SlapLoginCurrentSoftwareInstance \
RequestComputerPartition \
Tic \
SlapLogout \
\
SetCurrentSoftwareInstanceRequested \
LoginDefaultUser \
CheckComputerPartitionInstanceSetupSalePackingListStopped \
Logout \
\
SlapLoginCurrentComputer \
SoftwareInstanceStopped \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceHostingSalePackingListDelivered \
Logout \
\
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
# XXX: This test fails because test_vifib_customer security is cached
# and this user is not in SOFTINST-x group. We do not want to clear
# cache in 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