$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
}
# 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