From f71b1bcd4f85da0d4fee541d76813afa4283e46c Mon Sep 17 00:00:00 2001 From: Rueian Date: Thu, 26 Dec 2024 15:27:58 +0800 Subject: [PATCH] Test availability_zone in the HELLO response Signed-off-by: Rueian --- tests/unit/tracking.tcl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/unit/tracking.tcl b/tests/unit/tracking.tcl index 313293dcb7..68f5b8f3c1 100644 --- a/tests/unit/tracking.tcl +++ b/tests/unit/tracking.tcl @@ -171,6 +171,20 @@ start_server {tags {"tracking network logreqres:skip"}} { r HELLO 3 } + test {HELLO with availability-zone} { + r CONFIG SET availability-zone myzone + + set reply [r HELLO 3] + assert_equal [dict get $reply availability_zone] myzone + + set reply [r HELLO 2] + assert_equal [dict get $reply availability_zone] myzone + + # restore for next test + r HELLO 3 + r CONFIG SET availability-zone "" + } + test {RESP3 based basic invalidation} { r CLIENT TRACKING off r CLIENT TRACKING on