diff --git a/tests/protosupport/multi_protocol_functions.py b/tests/protosupport/multi_protocol_functions.py index 3f44d5ae27897187ad9da3f091e997550ac324e7..93c2bb6be52beaf7c61c6a7030ae3c42e04462b8 100644 --- a/tests/protosupport/multi_protocol_functions.py +++ b/tests/protosupport/multi_protocol_functions.py @@ -322,7 +322,7 @@ def db_table_record_count(table_name, db_type, line="", grep_cmd=None, db_name=w elif table_name == 'lease4': select = "select" for attribute in lease: - if attribute in ["address", "hwaddr"]: + if attribute in ["address", "hwaddr", "client_id"]: select += ", hex(%s)" % attribute else: select += ", %s" % attribute @@ -744,6 +744,8 @@ def check_leases(leases_list, backend='memfile', destination=world.f_cfg.mgmt_ad if backend == 'memfile': for lease in leases_list_copy: cmd = "cat %s " % world.f_cfg.get_leases_path() + if "client_id" in lease: + lease['client_id'] = ':'.join(lease['client_id'][i:i + 2] for i in range(0, 14, 2)) for attribute in lease: cmd += "| grep -E %s " % lease[attribute] cmd += "| grep -c ^" diff --git a/tests/protosupport/v4/srv_msg.py b/tests/protosupport/v4/srv_msg.py index 7083148465c26cdc7e334d99b75cb6e6239b61f1..08a4cc2741d510fc5877a583ca8f3c379aeda44c 100644 --- a/tests/protosupport/v4/srv_msg.py +++ b/tests/protosupport/v4/srv_msg.py @@ -504,7 +504,7 @@ def get_all_leases(decode_duid=True): lease = {"hwaddr": mac, "address": world.srvmsg[0].yiaddr} try: - lease.update({"client_id": get_option(world.srvmsg[0], 61)[1]}) + lease.update({"client_id": get_option(world.srvmsg[0], 61)[1]}.hex()) except: pass lease.update({"valid_lifetime": get_option(world.srvmsg[0], 51)[1]})