mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
test-network: merge two more tests with test_dhcp_client_ipv4_only
This commit is contained in:
parent
3d8e0aa2de
commit
0730e3767d
@ -22,6 +22,10 @@ ClientIdentifier=mac
|
||||
VendorClassIdentifier=FooBarVendorTest
|
||||
Label=test-label
|
||||
ListenPort=5555
|
||||
SendDecline=yes
|
||||
# DenyList= will be ignored
|
||||
AllowList=192.168.5.0/24 192.168.6.0/24
|
||||
DenyList=192.168.5.0/24
|
||||
|
||||
[Route]
|
||||
Destination=192.168.5.0/24
|
||||
|
@ -1,14 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=veth-peer
|
||||
|
||||
[Network]
|
||||
Address=192.168.5.1/24
|
||||
IPv6AcceptRA=false
|
||||
DHCPServer=yes
|
||||
|
||||
[DHCPServer]
|
||||
PoolOffset=10
|
||||
PoolSize=100
|
||||
DNS=192.168.5.1
|
||||
NTP=192.168.5.1
|
@ -4479,9 +4479,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||
'25-veth.netdev',
|
||||
'25-vrf.netdev',
|
||||
'25-vrf.network',
|
||||
'25-dhcp-client-allow-list.network',
|
||||
'25-dhcp-client-anonymize.network',
|
||||
'25-dhcp-client-decline.network',
|
||||
'25-dhcp-client-gateway-ipv6.network',
|
||||
'25-dhcp-client-gateway-onlink-implicit.network',
|
||||
'25-dhcp-client-ipv4-only.network',
|
||||
@ -4492,7 +4490,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||
'25-dhcp-client-vrf.network',
|
||||
'25-dhcp-client-with-ipv4ll.network',
|
||||
'25-dhcp-client.network',
|
||||
'25-dhcp-server-decline.network',
|
||||
'25-dhcp-server-veth-peer.network',
|
||||
'25-static.network']
|
||||
|
||||
@ -5001,26 +4998,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||
check(self, False, True)
|
||||
check(self, False, False)
|
||||
|
||||
def test_dhcp_client_decline(self):
|
||||
copy_unit_to_networkd_unit_path('25-veth.netdev', '25-dhcp-server-decline.network', '25-dhcp-client-decline.network')
|
||||
|
||||
start_networkd()
|
||||
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
||||
|
||||
output = check_output('ip -4 address show dev veth99 scope global dynamic')
|
||||
print(output)
|
||||
self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic veth99')
|
||||
|
||||
def test_dhcp_client_allow_list(self):
|
||||
copy_unit_to_networkd_unit_path('25-veth.netdev', '25-dhcp-server-decline.network', '25-dhcp-client-allow-list.network')
|
||||
|
||||
start_networkd()
|
||||
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
||||
|
||||
output = check_output('ip -4 address show dev veth99 scope global dynamic')
|
||||
print(output)
|
||||
self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic veth99')
|
||||
|
||||
class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
|
||||
links = [
|
||||
'dummy97',
|
||||
|
Loading…
x
Reference in New Issue
Block a user