Commit 5674bab6 authored by Łukasz Nowak's avatar Łukasz Nowak

Support transmitted timestamp.

parent 3f25be50
...@@ -104,6 +104,9 @@ class TestVifibSlapComputerPartitionGetInstanceParameterDict(TestVifibSlapWebSer ...@@ -104,6 +104,9 @@ class TestVifibSlapComputerPartitionGetInstanceParameterDict(TestVifibSlapWebSer
""" """
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + '\ sequence_string = self.prepare_install_requested_computer_partition_sequence_string + '\
LoginERP5TypeTestCase \
FillTimestamp \
Logout \
SlapLoginCurrentSoftwareInstance \ SlapLoginCurrentSoftwareInstance \
CheckMinimalParametersTransmitted \ CheckMinimalParametersTransmitted \
SlapLogout \ SlapLogout \
...@@ -125,6 +128,9 @@ class TestVifibSlapComputerPartitionGetInstanceParameterDict(TestVifibSlapWebSer ...@@ -125,6 +128,9 @@ class TestVifibSlapComputerPartitionGetInstanceParameterDict(TestVifibSlapWebSer
SetSoftwareInstanceValidXML \ SetSoftwareInstanceValidXML \
Tic \ Tic \
Logout \ Logout \
LoginERP5TypeTestCase \
FillTimestamp \
Logout
SlapLoginCurrentSoftwareInstance \ SlapLoginCurrentSoftwareInstance \
CheckComputerPartitionGetInstanceParameterDictResult \ CheckComputerPartitionGetInstanceParameterDictResult \
SlapLogout \ SlapLogout \
......
...@@ -3412,6 +3412,17 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -3412,6 +3412,17 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition.getInstanceParameterDict() computer_partition.getInstanceParameterDict()
def stepFillTimestamp(self, sequence, **kw):
get = self.portal.portal_catalog.getResultValue
timestamp = int(get(uid=sequence['computer_partition_uid']\
).getModificationDate())
instance = get(uid=sequence['software_instance_uid'])
newtimestamp = int(instance.getBangTimestamp(int(
instance.getModificationDate())))
if (newtimestamp > timestamp):
timestamp = newtimestamp
sequence['partition_timestamp'] = timestamp
def stepCheckMinimalParametersTransmitted(self, sequence, **kw): def stepCheckMinimalParametersTransmitted(self, sequence, **kw):
""" """
Check that slap.registerComputerPartition raises a NotFound error Check that slap.registerComputerPartition raises a NotFound error
...@@ -3435,6 +3446,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -3435,6 +3446,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
'requested_software_type'), 'requested_software_type'),
'slave_instance_list': [], 'slave_instance_list': [],
'ip_list': [], 'ip_list': [],
'timestamp': sequence['partition_timestamp']
} }
self.assertSameDict(expected, result) self.assertSameDict(expected, result)
...@@ -3536,6 +3548,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -3536,6 +3548,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
'test_parameter': 'lala', 'test_parameter': 'lala',
'slave_instance_list': [], 'slave_instance_list': [],
'ip_list': [], 'ip_list': [],
'timestamp': sequence['partition_timestamp']
} }
self.assertSameDict(expected, result) self.assertSameDict(expected, result)
......
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