mirror of
https://github.com/systemd/systemd.git
synced 2024-12-04 15:53:41 +08:00
test-network: add tests for static lease matching with chaddr
Follow-up for 4646cdaa37
(#27313).
This commit is contained in:
parent
db4afb95c2
commit
82c60c939c
@ -4559,6 +4559,17 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
||||
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'veth99', env=env)
|
||||
print(output)
|
||||
self.assertIn('Address: 10.1.1.200 (DHCP4 via 10.1.1.1)', output)
|
||||
self.assertIn('DHCP4 Client ID: 12:34:56:78:9a:bc', output)
|
||||
|
||||
def test_dhcp_server_static_lease_default_client_id(self):
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server-static-lease.network')
|
||||
start_networkd()
|
||||
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
||||
|
||||
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'veth99', env=env)
|
||||
print(output)
|
||||
self.assertIn('Address: 10.1.1.200 (DHCP4 via 10.1.1.1)', output)
|
||||
self.assertRegex(output, 'DHCP4 Client ID: IAID:[0-9a-z]*/DUID')
|
||||
|
||||
class NetworkdDHCPServerRelayAgentTests(unittest.TestCase, Utilities):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user