[cert-test] support parsing multiple keys (#11618)

This commit is contained in:
Yakun Xu
2025-06-30 08:48:40 -07:00
committed by GitHub
parent 516a95fca9
commit 38cfb2fddc
26 changed files with 142 additions and 104 deletions
+8 -5
View File
@@ -97,7 +97,7 @@ class TestCase(NcpSupportMixin, unittest.TestCase):
"""
USE_MESSAGE_FACTORY = True
TOPOLOGY = None
TOPOLOGY = {}
CASE_WIRESHARK_PREFS = None
SUPPORT_THREAD_1_1 = True
PACKET_VERIFICATION = config.PACKET_VERIFICATION_DEFAULT
@@ -142,7 +142,10 @@ class TestCase(NcpSupportMixin, unittest.TestCase):
"""
self._clean_up_tmp()
self.simulator = config.create_default_simulator(use_message_factory=self.USE_MESSAGE_FACTORY)
key_manager = config.create_default_thread_key_manager()
self.simulator = config.create_default_simulator(
config.create_default_thread_message_factory(key_manager) if self.USE_MESSAGE_FACTORY else None)
self.nodes = {}
os.environ['LD_LIBRARY_PATH'] = '/tmp/thread-wireshark'
@@ -255,7 +258,7 @@ class TestCase(NcpSupportMixin, unittest.TestCase):
'channel_mask': config.CHANNEL_MASK,
'extended_panid': config.EXTENDED_PANID,
'mesh_local_prefix': config.MESH_LOCAL_PREFIX.split('/')[0],
'network_key': binascii.hexlify(config.DEFAULT_NETWORK_KEY).decode(),
'network_key': config.DEFAULT_NETWORK_KEY,
'network_name': config.NETWORK_NAME,
'panid': config.PANID,
'pskc': config.PSKC,
@@ -264,8 +267,8 @@ class TestCase(NcpSupportMixin, unittest.TestCase):
if 'channel' in params:
dataset['channel'] = params['channel']
if 'networkkey' in params:
dataset['network_key'] = params['networkkey']
if 'network_key' in params:
dataset['network_key'] = params['network_key']
if 'network_name' in params:
dataset['network_name'] = params['network_name']
if 'panid' in params: