mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
test-network: update KeepConfiguration=dhcp -> dynamic
This commit is contained in:
@@ -5,4 +5,4 @@ Name=veth99
|
||||
[Network]
|
||||
DHCP=ipv4
|
||||
IPv6AcceptRA=false
|
||||
KeepConfiguration=dhcp-on-stop
|
||||
KeepConfiguration=dynamic-on-stop
|
||||
@@ -5,4 +5,4 @@ Name=veth99
|
||||
[Network]
|
||||
DHCP=ipv4
|
||||
IPv6AcceptRA=false
|
||||
KeepConfiguration=dhcp
|
||||
KeepConfiguration=dynamic
|
||||
@@ -7277,10 +7277,10 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||
self.assertNotIn('test-hostname', output)
|
||||
self.assertNotIn('26:mtu', output)
|
||||
|
||||
def test_dhcp_keep_configuration_dhcp(self):
|
||||
def test_dhcp_keep_configuration_dynamic(self):
|
||||
copy_network_unit('25-veth.netdev',
|
||||
'25-dhcp-server-veth-peer.network',
|
||||
'25-dhcp-client-keep-configuration-dhcp.network')
|
||||
'25-dhcp-client-keep-configuration-dynamic.network')
|
||||
start_networkd()
|
||||
self.wait_online('veth-peer:carrier')
|
||||
start_dnsmasq()
|
||||
@@ -7312,7 +7312,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global veth99\n *'
|
||||
'valid_lft forever preferred_lft forever')
|
||||
|
||||
with open(os.path.join(network_unit_dir, '25-dhcp-client-keep-configuration-dhcp.network'), mode='a', encoding='utf-8') as f:
|
||||
with open(os.path.join(network_unit_dir, '25-dhcp-client-keep-configuration-dynamic.network'), mode='a', encoding='utf-8') as f:
|
||||
f.write('[Network]\nDHCP=no\n')
|
||||
|
||||
start_networkd()
|
||||
@@ -7324,10 +7324,10 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global veth99\n *'
|
||||
'valid_lft forever preferred_lft forever')
|
||||
|
||||
def test_dhcp_keep_configuration_dhcp_on_stop(self):
|
||||
def test_dhcp_keep_configuration_dynamic_on_stop(self):
|
||||
copy_network_unit('25-veth.netdev',
|
||||
'25-dhcp-server-veth-peer.network',
|
||||
'25-dhcp-client-keep-configuration-dhcp-on-stop.network')
|
||||
'25-dhcp-client-keep-configuration-dynamic-on-stop.network')
|
||||
start_networkd()
|
||||
self.wait_online('veth-peer:carrier')
|
||||
start_dnsmasq()
|
||||
|
||||
Reference in New Issue
Block a user