From: Nick Porter Date: Tue, 31 Jan 2023 17:02:13 +0000 (+0000) Subject: Tidy and fix up redis clust_node_fail test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e99bf213bacd5221c30adb1de48196954040878b;p=thirdparty%2Ffreeradius-server.git Tidy and fix up redis clust_node_fail test --- diff --git a/src/tests/modules/redis/cluster_node_fail.unlang b/src/tests/modules/redis/cluster_node_fail.unlang index 1d8b0b2e981..c54d338afdb 100644 --- a/src/tests/modules/redis/cluster_node_fail.unlang +++ b/src/tests/modules/redis/cluster_node_fail.unlang @@ -4,9 +4,7 @@ $INCLUDE cluster_reset.inc # Hashes to Redis cluster node master 1 -if ("%(redis:SET b 'boom')" == 'OK') { - test_pass -} else { +if (!("%(redis:SET b 'boom')" == 'OK')) { test_fail } @@ -16,35 +14,25 @@ if ("%(redis:SET b 'boom')" == 'OK') { # Cause one of the redis cluster nodes to SEGV if ("%(redis:@%(redis_node:b 0) DEBUG SEGFAULT)" != '') { test_fail -} else { - test_pass } # Forcefully failover the slave for that node -if ("%(redis:@%(redis_node:b 1) CLUSTER FAILOVER TAKEOVER)" != 'OK') { +if (!("%(redis:@%(redis_node:b 1) CLUSTER FAILOVER TAKEOVER)" == 'OK')) { test_fail -} else { - test_pass } -if ("%(redis:GET b)" == 'boom') { - test_pass -} else { +if (!("%(redis:GET b)" == 'boom')) { test_fail } # Kill that one too if ("%(redis:@%(redis_node:b) DEBUG SEGFAULT)" != '') { test_fail -} else { - test_pass } # No alternatives... -if ("%(redis:GET b)" != 'boom') { - test_pass -} else { +if ("%(redis:GET b)" == 'boom') { test_fail } - +test_pass