Commit 49c9f629 authored by Łukasz Nowak's avatar Łukasz Nowak

slapos proxy/test: Assert integers in request/publish

parent 36698874
......@@ -616,6 +616,33 @@ class TestRequest(MasterMixin):
self.assertIsInstance(request, slapos.slap.ComputerPartition)
def test_request_with_int(self):
"""
Verify that request with int parameters is correctly accepted
"""
self.add_free_partition(1)
request = self.request('http://sr//', None, 'myinstance', 'slappart0',
partition_parameter_kw={'int': 1})
self.assertIsInstance(request, slapos.slap.ComputerPartition)
def test_request_set_connection_parameters_with_int(self):
"""
Cerify that request int works in connection parameters
Please register or sign in to reply
"""
self.add_free_partition(1)
partition_id = self.request('http://sr//', None, 'myinstance', 'slappart0')._partition_id
# Set connection parameter
partition = self.getPartitionInformation(partition_id)
self.setConnectionDict(partition_id=partition_id,
connection_dict={'foo': 1})
# Get updated information for the partition
partition_new = self.request('http://sr//', None, 'myinstance', 'slappart0')
self.assertEqual(slave_partition.getConnectionParameter('foo'), 1)
Please register or sign in to reply
class TestSlaveRequest(MasterMixin):
"""
Test requests related to slave instances.
......
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