Skip to content

Commit 5102a2b

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[Fullstack] Remove unnecessary tests" into stable/zed
2 parents 2de488a + 69bda73 commit 5102a2b

File tree

8 files changed

+0
-553
lines changed

8 files changed

+0
-553
lines changed

neutron/tests/fullstack/agents/ovs_agent.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,9 @@
2222
from neutron.agent.common import polling
2323
from neutron.agent.l2.extensions import qos as qos_extension
2424
from neutron.common import config
25-
from neutron.services.trunk.drivers.openvswitch.agent \
26-
import driver as trunk_driver
2725
from neutron.tests.common.agents import ovs_agent
2826

2927

30-
def monkeypatch_init_handler():
31-
original_handler = trunk_driver.init_handler
32-
33-
def new_init_handler(resource, event, trigger, payload=None):
34-
# NOTE(slaweq): make this setup conditional based on server-side
35-
# capabilities for fullstack tests we can assume that server-side
36-
# and agent-side conf are in sync
37-
if "trunk" not in cfg.CONF.service_plugins:
38-
return
39-
original_handler(resource, event, trigger, payload)
40-
41-
trunk_driver.init_handler = new_init_handler
42-
43-
4428
def monkeypatch_qos():
4529
mock.patch.object(ovs_lib.OVSBridge, 'clear_bandwidth_qos').start()
4630
if "qos" in cfg.CONF.service_plugins:
@@ -63,7 +47,6 @@ def main():
6347
# ovs-vswitchd processes for each test will be isolated in separate
6448
# namespace
6549
config.register_common_config_options()
66-
monkeypatch_init_handler()
6750
monkeypatch_qos()
6851
monkeypatch_event_filtering()
6952
ovs_agent.main()

neutron/tests/fullstack/test_connectivity.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,6 @@ def _test_connectivity(self):
8383
vms.ping_all()
8484

8585

86-
class TestOvsConnectivitySameNetwork(BaseConnectivitySameNetworkTest):
87-
88-
l2_agent_type = constants.AGENT_TYPE_OVS
89-
scenarios = [
90-
('VXLAN', {'network_type': 'vxlan',
91-
'l2_pop': False}),
92-
('GRE-l2pop-arp_responder', {'network_type': 'gre',
93-
'l2_pop': True,
94-
'arp_responder': True}),
95-
('VLANs', {'network_type': 'vlan',
96-
'l2_pop': False})]
97-
98-
def test_connectivity(self):
99-
self._test_connectivity()
100-
101-
10286
class TestOvsConnectivitySameNetworkOnOvsBridgeControllerStop(
10387
BaseConnectivitySameNetworkTest):
10488

neutron/tests/fullstack/test_dhcp_agent.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ class TestDhcpAgentNoHA(BaseDhcpAgentTest):
9191
number_of_hosts = 1
9292
agent_down_time = 60
9393

94-
def test_dhcp_assignment(self):
95-
# First check if network was scheduled to one DHCP agent
96-
dhcp_agents = self.client.list_dhcp_agent_hosting_networks(
97-
self.network['id'])
98-
self.assertEqual(1, len(dhcp_agents['agents']))
99-
100-
# And check if IP and gateway config is fine on FakeMachine
101-
self.vm.block_until_dhcp_config_done()
102-
10394
def test_mtu_update(self):
10495
# The test case needs access to devices in nested namespaces. ip_lib
10596
# doesn't support it, and it's probably unsafe to touch the library for

neutron/tests/fullstack/test_l3_agent.py

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import os
1717
import time
1818

19-
import netaddr
2019
from neutron_lib import constants
2120
from neutronclient.common import exceptions
2221
from oslo_utils import uuidutils
@@ -323,18 +322,6 @@ def setUp(self):
323322
host_descriptions)
324323
super(TestLegacyL3Agent, self).setUp(env)
325324

326-
def test_namespace_exists(self):
327-
tenant_id = uuidutils.generate_uuid()
328-
329-
router = self.safe_client.create_router(tenant_id)
330-
network = self.safe_client.create_network(tenant_id)
331-
subnet = self.safe_client.create_subnet(
332-
tenant_id, network['id'], '20.0.0.0/24', gateway_ip='20.0.0.1')
333-
self.safe_client.add_router_interface(router['id'], subnet['id'])
334-
335-
namespace = self._get_namespace(router['id'])
336-
self.assert_namespace_exists(namespace)
337-
338325
def test_mtu_update(self):
339326
tenant_id = uuidutils.generate_uuid()
340327

@@ -361,92 +348,6 @@ def test_mtu_update(self):
361348
network = self.safe_client.update_network(network['id'], mtu=mtu)
362349
common_utils.wait_until_true(lambda: ri_dev.link.mtu == mtu)
363350

364-
def test_east_west_traffic(self):
365-
tenant_id = uuidutils.generate_uuid()
366-
router = self.safe_client.create_router(tenant_id)
367-
368-
vm1 = self._create_net_subnet_and_vm(
369-
tenant_id, ['20.0.0.0/24', '2001:db8:aaaa::/64'],
370-
self.environment.hosts[0], router)
371-
vm2 = self._create_net_subnet_and_vm(
372-
tenant_id, ['21.0.0.0/24', '2001:db8:bbbb::/64'],
373-
self.environment.hosts[1], router)
374-
375-
vm1.block_until_ping(vm2.ip)
376-
# Verify ping6 from vm2 to vm1 IPv6 Address
377-
vm2.block_until_ping(vm1.ipv6)
378-
379-
def test_north_south_traffic(self):
380-
# This function creates an external network which is connected to
381-
# central_bridge and spawns an external_vm on it.
382-
# The external_vm is configured with the gateway_ip (both v4 & v6
383-
# addresses) of external subnet. Later, it creates a tenant router,
384-
# a tenant network and two tenant subnets (v4 and v6). The tenant
385-
# router is associated with tenant network and external network to
386-
# provide north-south connectivity to the VMs.
387-
# We validate the following in this testcase.
388-
# 1. SNAT support: using ping from tenant VM to external_vm
389-
# 2. Floating IP support: using ping from external_vm to VM floating ip
390-
# 3. IPv6 ext connectivity: using ping6 from tenant vm to external_vm.
391-
tenant_id = uuidutils.generate_uuid()
392-
ext_net, ext_sub = self._create_external_network_and_subnet(tenant_id)
393-
external_vm = self._create_external_vm(ext_net, ext_sub)
394-
# Create an IPv6 subnet in the external network
395-
v6network = self.useFixture(
396-
ip_network.ExclusiveIPNetwork(
397-
"2001:db8:1234::1", "2001:db8:1234::10", "64")).network
398-
# NOTE(ykarel): gateway_ip is explicitly added as iputils package
399-
# requires fix for https://github.com/iputils/iputils/issues/371
400-
# is not available in CentOS 9-Stream
401-
ext_v6sub = self.safe_client.create_subnet(
402-
tenant_id, ext_net['id'], v6network, gateway_ip='2001:db8:1234::1')
403-
404-
router = self.safe_client.create_router(tenant_id,
405-
external_network=ext_net['id'])
406-
407-
# Configure the gateway_ip of external v6subnet on the external_vm.
408-
external_vm.ipv6_cidr = common_utils.ip_to_cidr(
409-
ext_v6sub['gateway_ip'], 64)
410-
411-
# Configure an IPv6 downstream route to the v6Address of router gw port
412-
for fixed_ip in router['external_gateway_info']['external_fixed_ips']:
413-
if netaddr.IPNetwork(fixed_ip['ip_address']).version == 6:
414-
external_vm.set_default_gateway(fixed_ip['ip_address'])
415-
416-
vm = self._create_net_subnet_and_vm(
417-
tenant_id, ['20.0.0.0/24', '2001:db8:aaaa::/64'],
418-
self.environment.hosts[1], router)
419-
420-
# ping external vm to test snat
421-
vm.block_until_ping(external_vm.ip)
422-
423-
fip = self.safe_client.create_floatingip(
424-
tenant_id, ext_net['id'], vm.ip, vm.neutron_port['id'])
425-
426-
# ping floating ip from external vm
427-
external_vm.block_until_ping(fip['floating_ip_address'])
428-
429-
# Verify VM is able to reach the router interface.
430-
vm.block_until_ping(vm.gateway_ipv6)
431-
# Verify north-south connectivity using ping6 to external_vm.
432-
vm.block_until_ping(external_vm.ipv6)
433-
434-
# Now let's remove and create again phys bridge and check connectivity
435-
# once again
436-
br_phys = self.environment.hosts[0].br_phys
437-
br_phys.destroy()
438-
br_phys.create()
439-
self.environment.hosts[0].connect_to_central_network_via_vlans(
440-
br_phys)
441-
442-
# ping floating ip from external vm
443-
external_vm.block_until_ping(fip['floating_ip_address'])
444-
445-
# Verify VM is able to reach the router interface.
446-
vm.block_until_ping(vm.gateway_ipv6)
447-
# Verify north-south connectivity using ping6 to external_vm.
448-
vm.block_until_ping(external_vm.ipv6)
449-
450351
def test_gateway_ip_changed(self):
451352
self._test_gateway_ip_changed()
452353

neutron/tests/fullstack/test_qos.py

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from neutron.tests.unit import testlib_api
3030

3131
from neutron.agent.common import ovs_lib
32-
from neutron.services.qos.drivers.openvswitch import driver as ovs_drv
3332

3433

3534
load_tests = testlib_api.module_load_tests
@@ -201,47 +200,6 @@ def _restart_agent_and_check_rules_applied(self, policy_id, vm,
201200
for direction in list(all_directions):
202201
self._wait_for_bw_rule_applied(vm, None, None, direction)
203202

204-
def test_bw_limit_qos_policy_rule_lifecycle(self):
205-
new_limit = BANDWIDTH_LIMIT + 100
206-
207-
# Create port with qos policy attached
208-
vm, qos_policy = self._prepare_vm_with_qos_policy(
209-
[functools.partial(
210-
self._add_bw_limit_rule,
211-
BANDWIDTH_LIMIT, BANDWIDTH_BURST, self.direction)])
212-
bw_rule = qos_policy['rules'][0]
213-
214-
self._wait_for_bw_rule_applied(
215-
vm, BANDWIDTH_LIMIT, BANDWIDTH_BURST, self.direction)
216-
qos_policy_id = qos_policy['id']
217-
218-
self.client.delete_bandwidth_limit_rule(bw_rule['id'], qos_policy_id)
219-
self._wait_for_bw_rule_removed(vm, self.direction)
220-
221-
# Create new rule with no given burst value, in such case ovs and lb
222-
# agent should apply burst value as
223-
# bandwidth_limit * qos_consts.DEFAULT_BURST_RATE
224-
new_expected_burst = self._get_expected_burst_value(new_limit,
225-
self.direction)
226-
new_rule = self.safe_client.create_bandwidth_limit_rule(
227-
self.tenant_id, qos_policy_id, new_limit, direction=self.direction)
228-
self._wait_for_bw_rule_applied(
229-
vm, new_limit, new_expected_burst, self.direction)
230-
231-
# Update qos policy rule id
232-
self.client.update_bandwidth_limit_rule(
233-
new_rule['id'], qos_policy_id,
234-
body={'bandwidth_limit_rule': {'max_kbps': BANDWIDTH_LIMIT,
235-
'max_burst_kbps': BANDWIDTH_BURST}})
236-
self._wait_for_bw_rule_applied(
237-
vm, BANDWIDTH_LIMIT, BANDWIDTH_BURST, self.direction)
238-
239-
# Remove qos policy from port
240-
self.client.update_port(
241-
vm.neutron_port['id'],
242-
body={'port': {'qos_policy_id': None}})
243-
self._wait_for_bw_rule_removed(vm, self.direction)
244-
245203
def test_bw_limit_direction_change(self):
246204
# Create port with qos policy attached, with rule self.direction
247205
vm, qos_policy = self._prepare_vm_with_qos_policy(
@@ -584,27 +542,6 @@ class TestPacketRateLimitQoSOvs(_TestPacketRateLimitQoS,
584542
]
585543

586544

587-
class TestQoSWithL2Population(base.BaseFullStackTestCase):
588-
scenarios = [
589-
(constants.AGENT_TYPE_OVS,
590-
{'mech_drivers': 'openvswitch',
591-
'supported_rules': ovs_drv.SUPPORTED_RULES}),
592-
]
593-
594-
def setUp(self):
595-
host_desc = [] # No need to register agents for this test case
596-
env_desc = environment.EnvironmentDescription(
597-
qos=True, l2_pop=True, mech_drivers=self.mech_drivers)
598-
env = environment.Environment(env_desc, host_desc)
599-
super(TestQoSWithL2Population, self).setUp(env)
600-
601-
def test_supported_qos_rule_types(self):
602-
res = self.client.list_qos_rule_types()
603-
rule_types = {t['type'] for t in res['rule_types']}
604-
expected_rules = set(self.supported_rules)
605-
self.assertEqual(expected_rules, rule_types)
606-
607-
608545
class TestQoSPolicyIsDefault(base.BaseFullStackTestCase):
609546

610547
NAME = 'fs_policy'

neutron/tests/fullstack/test_securitygroup.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -669,21 +669,6 @@ def setUp(self):
669669
host_descriptions)
670670
super(SecurityGroupRulesTest, self).setUp(env)
671671

672-
def test_security_group_rule_quota(self):
673-
project_id = uuidutils.generate_uuid()
674-
quota = self.client.show_quota_details(project_id)
675-
sg_rules_used = quota['quota']['security_group_rule']['used']
676-
self.assertEqual(0, sg_rules_used)
677-
678-
self.safe_client.create_security_group(project_id)
679-
quota = self.client.show_quota_details(project_id)
680-
sg_rules_used = quota['quota']['security_group_rule']['used']
681-
self.safe_client.update_quota(project_id, 'security_group_rule',
682-
sg_rules_used)
683-
684-
self.assertRaises(nc_exc.OverQuotaClient,
685-
self.safe_client.create_security_group, project_id)
686-
687672
def test_normalized_cidr_in_rule(self):
688673
project_id = uuidutils.generate_uuid()
689674
sg = self.safe_client.create_security_group(project_id)

neutron/tests/fullstack/test_subnet.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,6 @@ def _create_subnet(self, project_id, network_id, cidr=None,
6161
def _show_subnet(self, subnet_id):
6262
return self.client.show_subnet(subnet_id)
6363

64-
def test_create_subnet_ipv4(self):
65-
cidr = self.useFixture(
66-
ip_network.ExclusiveIPNetwork(
67-
'240.0.0.0', '240.255.255.255', '24')).network
68-
subnet = self._create_subnet(self._project_id, self._network['id'],
69-
cidr)
70-
subnet = self._show_subnet(subnet['id'])
71-
self.assertEqual(subnet['subnet']['gateway_ip'],
72-
str(netaddr.IPNetwork(cidr).network + 1))
73-
74-
def test_create_subnet_ipv6_slaac(self):
75-
cidr = self.useFixture(
76-
ip_network.ExclusiveIPNetwork(
77-
'2001:db8::', '2001:db8::ffff', '64')).network
78-
subnet = self._create_subnet(self._project_id, self._network['id'],
79-
cidr, ipv6_address_mode='slaac',
80-
ipv6_ra_mode='slaac')
81-
subnet = self._show_subnet(subnet['id'])
82-
self.assertEqual(subnet['subnet']['gateway_ip'],
83-
str(netaddr.IPNetwork(cidr).network))
84-
8564
def test_create_subnet_ipv6_prefix_delegation(self):
8665
subnet = self._create_subnet(self._project_id, self._network['id'],
8766
None, ipv6_address_mode='slaac',

0 commit comments

Comments
 (0)