Merge "[Fullstack] Remove SecurityGroupRulesTest.test_normalized_cidr_in_rule test"

This commit is contained in:
Zuul 2023-12-12 20:26:35 +00:00 committed by Gerrit Code Review
commit a09e0f2025
1 changed files with 0 additions and 24 deletions

View File

@ -662,27 +662,3 @@ class TestSecurityGroupsSameNetwork(BaseSecurityGroupsSameNetworkTest):
vm1, vm2, net_helpers.NetcatTester.TCP, port + 1)
self.verify_no_connectivity_between_vms(
vm2, vm1, net_helpers.NetcatTester.TCP, port + 1)
class SecurityGroupRulesTest(base.BaseFullStackTestCase):
def setUp(self):
host_descriptions = [environment.HostDescription()]
env = environment.Environment(environment.EnvironmentDescription(),
host_descriptions)
super(SecurityGroupRulesTest, self).setUp(env)
def test_normalized_cidr_in_rule(self):
project_id = uuidutils.generate_uuid()
sg = self.safe_client.create_security_group(project_id)
rule = self.safe_client.create_security_group_rule(
project_id, sg['id'], direction='ingress',
remote_ip_prefix='10.0.0.34/24')
self.assertEqual('10.0.0.0/24', rule['normalized_cidr'])
self.assertEqual('10.0.0.34/24', rule['remote_ip_prefix'])
rule = self.safe_client.create_security_group_rule(
project_id, sg['id'], direction='ingress')
self.assertIsNone(rule['normalized_cidr'])
self.assertIsNone(rule['remote_ip_prefix'])