Merge "Ironic: Remove few misguided negative tests on ports"

This commit is contained in:
Jenkins 2014-12-09 03:30:03 +00:00 committed by Gerrit Code Review
commit 40545e19d8
2 changed files with 5 additions and 67 deletions
tempest/api/baremetal/admin

@ -57,11 +57,13 @@ class TestPorts(base.BaseBaremetalTest):
_, body = self.client.show_port(uuid)
self._assertExpected(port, body)
@test.skip_because(bug='1398350')
@test.attr(type='smoke')
def test_create_port_with_extra(self):
node_id = self.node['uuid']
address = data_utils.rand_mac_address()
extra = {'key': 'value'}
extra = {'str': 'value', 'int': 123, 'float': 0.123,
'bool': True, 'list': [1, 2, 3], 'dict': {'foo': 'bar'}}
_, port = self.create_port(node_id=node_id, address=address,
extra=extra)
@ -224,6 +226,7 @@ class TestPorts(base.BaseBaremetalTest):
_, body = self.client.show_port(port['uuid'])
self.assertEqual(extra, body['extra'])
@test.skip_because(bug='1398350')
@test.attr(type='smoke')
def test_update_port_mixed_ops(self):
node_id = self.node['uuid']
@ -234,7 +237,7 @@ class TestPorts(base.BaseBaremetalTest):
extra=extra)
new_address = data_utils.rand_mac_address()
new_extra = {'key1': 'new-value1', 'key3': 'new-value3'}
new_extra = {'key1': 0.123, 'key3': {'cat': 'meow'}}
patch = [{'path': '/address',
'op': 'replace',

@ -33,15 +33,6 @@ class TestPortsNegative(base.BaseBaremetalTest):
self.assertRaises(exc.BadRequest,
self.create_port, node_id=node_id, address=address)
@test.attr(type=['negative', 'smoke'])
def test_create_port_malformed_extra(self):
node_id = self.node['uuid']
address = data_utils.rand_mac_address()
extra = {'key': 0.123}
self.assertRaises(exc.BadRequest,
self.create_port, node_id=node_id,
address=address, extra=extra)
@test.attr(type=['negative', 'smoke'])
def test_create_port_nonexsistent_node_id(self):
node_id = str(data_utils.rand_uuid())
@ -159,31 +150,6 @@ class TestPortsNegative(base.BaseBaremetalTest):
patch=[{'path': '/address', 'op': 'replace',
'value': new_address}])
@test.attr(type=['negative', 'smoke'])
def test_update_port_add_malformed_extra(self):
node_id = self.node['uuid']
address = data_utils.rand_mac_address()
_, port = self.create_port(node_id=node_id, address=address)
port_id = port['uuid']
self.assertRaises(exc.BadRequest, self.client.update_port, port_id,
[{'path': '/extra/key', ' op': 'add',
'value': 0.123}])
@test.attr(type=['negative', 'smoke'])
def test_update_port_add_whole_malformed_extra(self):
node_id = self.node['uuid']
address = data_utils.rand_mac_address()
_, port = self.create_port(node_id=node_id, address=address)
port_id = port['uuid']
self.assertRaises(exc.BadRequest, self.client.update_port, port_id,
[{'path': '/extra',
'op': 'add',
'value': [1, 2, 3, 4, 'a']}])
@test.attr(type=['negative', 'smoke'])
def test_update_port_add_nonexistent_property(self):
node_id = self.node['uuid']
@ -256,37 +222,6 @@ class TestPortsNegative(base.BaseBaremetalTest):
self.assertRaises(exc.BadRequest,
self.client.update_port, port_id, patch)
@test.attr(type=['negative', 'smoke'])
def test_update_port_replace_extra_item_with_malformed(self):
node_id = self.node['uuid']
address = data_utils.rand_mac_address()
extra = {'key': 'value'}
_, port = self.create_port(node_id=node_id, address=address,
extra=extra)
port_id = port['uuid']
patch = [{'path': '/extra/key',
'op': 'replace',
'value': 0.123}]
self.assertRaises(exc.BadRequest,
self.client.update_port, port_id, patch)
@test.attr(type=['negative', 'smoke'])
def test_update_port_replace_whole_extra_with_malformed(self):
node_id = self.node['uuid']
address = data_utils.rand_mac_address()
_, port = self.create_port(node_id=node_id, address=address)
port_id = port['uuid']
patch = [{'path': '/extra',
'op': 'replace',
'value': [1, 2, 3, 4, 'a']}]
self.assertRaises(exc.BadRequest,
self.client.update_port, port_id, patch)
@test.attr(type=['negative', 'smoke'])
def test_update_port_replace_nonexistent_property(self):
node_id = self.node['uuid']