Remove _project_network_cidr in security group tests
This is to remove _project_network_cidr in security group tests and use str(self.cidr) instead, because self.cidr refers to the same configuration values at the base test class. Change-Id: I097988bcd3f340fd1fda0435e80c3027cf67471e
This commit is contained in:
parent
2c6a6f0cf0
commit
5d65cd7eeb
@ -23,7 +23,6 @@ CONF = config.CONF
|
||||
|
||||
|
||||
class SecGroupTest(base.BaseSecGroupTest):
|
||||
_project_network_cidr = CONF.network.project_network_cidr
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
@ -209,7 +208,7 @@ class SecGroupTest(base.BaseSecGroupTest):
|
||||
protocol = 'tcp'
|
||||
port_range_min = 76
|
||||
port_range_max = 77
|
||||
ip_prefix = self._project_network_cidr
|
||||
ip_prefix = str(self.cidr)
|
||||
self._create_verify_security_group_rule(sg_id, direction,
|
||||
self.ethertype, protocol,
|
||||
port_range_min,
|
||||
@ -238,4 +237,3 @@ class SecGroupTest(base.BaseSecGroupTest):
|
||||
|
||||
class SecGroupIPv6Test(SecGroupTest):
|
||||
_ip_version = 6
|
||||
_project_network_cidr = CONF.network.project_network_v6_cidr
|
||||
|
@ -24,7 +24,6 @@ CONF = config.CONF
|
||||
|
||||
|
||||
class NegativeSecGroupTest(base.BaseSecGroupTest):
|
||||
_project_network_cidr = CONF.network.project_network_cidr
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
@ -110,7 +109,7 @@ class NegativeSecGroupTest(base.BaseSecGroupTest):
|
||||
sg2_body, _ = self._create_security_group()
|
||||
|
||||
# Create rule specifying both remote_ip_prefix and remote_group_id
|
||||
prefix = self._project_network_cidr
|
||||
prefix = str(self.cidr)
|
||||
self.assertRaises(
|
||||
lib_exc.BadRequest,
|
||||
self.security_group_rules_client.create_security_group_rule,
|
||||
@ -225,7 +224,6 @@ class NegativeSecGroupTest(base.BaseSecGroupTest):
|
||||
|
||||
class NegativeSecGroupIPv6Test(NegativeSecGroupTest):
|
||||
_ip_version = 6
|
||||
_project_network_cidr = CONF.network.project_network_v6_cidr
|
||||
|
||||
@decorators.attr(type=['negative'])
|
||||
@decorators.idempotent_id('7607439c-af73-499e-bf64-f687fd12a842')
|
||||
|
Loading…
x
Reference in New Issue
Block a user