From ff93c47930156681d401a72fd6ce2e2593a6fbd7 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Mon, 6 Jun 2022 16:35:39 +0200 Subject: [PATCH] Fixed append_queries to honor RT variable Signed-off-by: Janos SUTO --- tests/cases/05-smtp.inc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/cases/05-smtp.inc b/tests/cases/05-smtp.inc index 65a97578..0a132053 100644 --- a/tests/cases/05-smtp.inc +++ b/tests/cases/05-smtp.inc @@ -69,12 +69,16 @@ run_05_sphinx_tests() { append_queries() { - append_query "select * from main1,dailydelta1,delta1 WHERE MATCH('@subject budaörsi dc felmérés')" 9 - append_query "select * from main1,dailydelta1,delta1 WHERE MATCH('@sender gruppi.hu')" 4 - append_query "select * from main1,dailydelta1,delta1 WHERE attachments > 0 AND MATCH('@subject spam ')" 85 - append_query "select * from main1,dailydelta1,delta1 WHERE attachments > 0 AND MATCH('@subject spam @attachment_types image')" 15 - append_query "select * from main1,dailydelta1,delta1 WHERE MATCH('@(subject,body) New Task TSK002*')" 29 - append_query "select * from main1,dailydelta1,delta1 WHERE MATCH('@subject \"virtualfax daily summary\" | \"adsl hibajegy\"')" 11 + local index="main1,dailydelta1,delta1" + + if [[ $RT -eq 1 ]]; then index="piler1"; fi + + append_query "select * from ${index} WHERE MATCH('@subject budaörsi dc felmérés')" 9 + append_query "select * from ${index} WHERE MATCH('@sender gruppi.hu')" 4 + append_query "select * from ${index} WHERE attachments > 0 AND MATCH('@subject spam ')" 85 + append_query "select * from ${index} WHERE attachments > 0 AND MATCH('@subject spam @attachment_types image')" 15 + append_query "select * from ${index} WHERE MATCH('@(subject,body) New Task TSK002*')" 29 + append_query "select * from ${index} WHERE MATCH('@subject \"virtualfax daily summary\" | \"adsl hibajegy\"')" 11 }