From 67c5c098a582020e867dc38b0d2c4323983cec40 Mon Sep 17 00:00:00 2001 From: Nihal Mehta Date: Fri, 15 Nov 2024 19:37:09 +0000 Subject: [PATCH] Add Debug Digest tests for AOF scenarios Signed-off-by: Nihal Mehta --- tests/test_aofrewrite.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_aofrewrite.py b/tests/test_aofrewrite.py index c9f2054..c89b611 100644 --- a/tests/test_aofrewrite.py +++ b/tests/test_aofrewrite.py @@ -20,7 +20,10 @@ def test_basic_aofrewrite_and_restore(self): bf_info_result_1 = client.execute_command('BF.INFO testSave') assert(len(bf_info_result_1)) != 0 curr_item_count_1 = client.info_obj().num_keys() - + # cmd debug digest + client.execute_command('DEBUG', 'DIGEST') + debug_original = client.execute_command('DEBUG DIGEST-VALUE testSave') + # save aof, restart sever client.bgrewriteaof() self.server.wait_for_action_done(ValkeyAction.AOF_REWRITE) @@ -36,6 +39,8 @@ def test_basic_aofrewrite_and_restore(self): assert bf_exists_result_2 == 1 bf_info_result_2 = client.execute_command('BF.INFO testSave') assert bf_info_result_2 == bf_info_result_1 + debug_copy = client.execute_command('DEBUG DIGEST-VALUE testSave') + assert debug_original == debug_copy client.execute_command('DEL testSave') def test_aofrewrite_bloomfilter_metrics(self):