]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: compare LLDP sender and receiver information 37845/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 15 Jun 2025 02:36:01 +0000 (11:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Jun 2025 16:51:19 +0000 (01:51 +0900)
test/test-network/systemd-networkd-tests.py

index 7f20aa4aa53daebd64d233a7db31e2d326c43fa1..710d94b46344a62713cf585b024f0cf4b75f4c59 100755 (executable)
@@ -6660,6 +6660,13 @@ class NetworkdLLDPTests(unittest.TestCase, Utilities):
         print(output)
         self.assertRegex(output, r'Connected To: .* on port veth-peer')
 
+        # Compare the json output from sender and receiver
+        sender_json = get_link_description('veth-peer')['LLDP']
+        receiver_json = json.loads(networkctl('--json=short', 'lldp', 'veth99'))['Neighbors'][0]['Neighbors'][0]
+        print(sender_json)
+        print(receiver_json)
+        self.assertEqual(sender_json, receiver_json)
+
 class NetworkdRATests(unittest.TestCase, Utilities):
 
     def setUp(self):