Remove a SGs API test following sync to Tempest
The dependent patch syncs the test from Neutron to Tempest
so it can be removed from the Neutron tree. Tests for core
resources belong to Tempest as described in the bug report.
Change-Id: I1e4d07fb659851755d5ffe7dd6fbae2d9f8a63fc
Related-Bug: #1552960
Depends-On: Ic77561757b5bd9ac61b1e059afdba19a98257126
diff --git a/neutron/tests/tempest/api/test_security_groups_negative.py b/neutron/tests/tempest/api/test_security_groups_negative.py
index 628dfc6..68b5fd0 100644
--- a/neutron/tests/tempest/api/test_security_groups_negative.py
+++ b/neutron/tests/tempest/api/test_security_groups_negative.py
@@ -29,38 +29,6 @@
def resource_setup(cls):
super(NegativeSecGroupTest, cls).resource_setup()
- @test.attr(type=['negative', 'gate'])
- @test.idempotent_id('0d9c7791-f2ad-4e2f-ac73-abf2373b0d2d')
- def test_create_security_group_rule_with_invalid_ports(self):
- group_create_body, _ = self._create_security_group()
-
- # Create rule for tcp protocol with invalid ports
- states = [(-16, 80, 'Invalid value for port -16'),
- (80, 79, 'port_range_min must be <= port_range_max'),
- (80, 65536, 'Invalid value for port 65536'),
- (None, 6, 'port_range_min must be <= port_range_max'),
- (-16, 65536, 'Invalid value for port')]
- for pmin, pmax, msg in states:
- ex = self.assertRaises(
- lib_exc.BadRequest, self.client.create_security_group_rule,
- security_group_id=group_create_body['security_group']['id'],
- protocol='tcp', port_range_min=pmin, port_range_max=pmax,
- direction='ingress', ethertype=self.ethertype)
- self.assertIn(msg, str(ex))
-
- # Create rule for icmp protocol with invalid ports
- states = [(1, 256, 'Invalid value for ICMP code'),
- (-1, 25, 'Invalid value'),
- (None, 6, 'ICMP type (port-range-min) is missing'),
- (300, 1, 'Invalid value for ICMP type')]
- for pmin, pmax, msg in states:
- ex = self.assertRaises(
- lib_exc.BadRequest, self.client.create_security_group_rule,
- security_group_id=group_create_body['security_group']['id'],
- protocol='icmp', port_range_min=pmin, port_range_max=pmax,
- direction='ingress', ethertype=self.ethertype)
- self.assertIn(msg, str(ex))
-
@test.attr(type='negative')
@test.idempotent_id('55100aa8-b24f-333c-0bef-64eefd85f15c')
def test_update_default_security_group_name(self):