@@ -1531,9 +1531,10 @@ def test_enable_subnet_dhcp_options_in_ovn_ipv4(self, grm, gps):
1531
1531
self .mech_driver .nb_ovn .set_lswitch_port .assert_has_calls (
1532
1532
set_lsp_calls , any_order = True )
1533
1533
1534
+ @mock .patch .object (ovn_utils , 'get_system_dns_resolvers' )
1534
1535
@mock .patch .object (db_base_plugin_v2 .NeutronDbPluginV2 , 'get_ports' )
1535
1536
@mock .patch .object (n_net , 'get_random_mac' )
1536
- def test_enable_subnet_dhcp_options_in_ovn_ipv6 (self , grm , gps ):
1537
+ def test_enable_subnet_dhcp_options_in_ovn_ipv6 (self , grm , gps , gsd ):
1537
1538
grm .return_value = '01:02:03:04:05:06'
1538
1539
gps .return_value = [
1539
1540
{'id' : 'port-id-1' , 'device_owner' : 'nova:compute' },
@@ -1546,6 +1547,7 @@ def test_enable_subnet_dhcp_options_in_ovn_ipv6(self, grm, gps):
1546
1547
{'opt_value' : '10::34' , 'ip_version' : 6 ,
1547
1548
'opt_name' : 'dns-server' }]},
1548
1549
{'id' : 'port-id-10' , 'device_owner' : 'network:foo' }]
1550
+ gsd .return_value = []
1549
1551
subnet = {'id' : 'subnet-id' , 'ip_version' : 6 , 'cidr' : '10::0/64' ,
1550
1552
'gateway_ip' : '10::1' , 'enable_dhcp' : True ,
1551
1553
'ipv6_address_mode' : 'dhcpv6-stateless' ,
@@ -1712,7 +1714,9 @@ def test_update_subnet_dhcp_options_in_ovn_ipv6(self):
1712
1714
self .mech_driver .nb_ovn .add_dhcp_options .assert_called_once_with (
1713
1715
subnet ['id' ], ** new_options )
1714
1716
1715
- def test_update_subnet_dhcp_options_in_ovn_ipv6_not_change (self ):
1717
+ @mock .patch .object (ovn_utils , 'get_system_dns_resolvers' )
1718
+ def test_update_subnet_dhcp_options_in_ovn_ipv6_not_change (self , gsd ):
1719
+ gsd .return_value = []
1716
1720
subnet = {'id' : 'subnet-id' , 'ip_version' : 6 , 'cidr' : '10::0/64' ,
1717
1721
'gateway_ip' : '10::1' , 'enable_dhcp' : True ,
1718
1722
'ipv6_address_mode' : 'dhcpv6-stateless' ,
0 commit comments