Skip to content

Commit

Permalink
Add IT test case
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Kao <[email protected]>
  • Loading branch information
seankao-az committed Apr 19, 2023
1 parent 6ac5d70 commit 88bbcc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ integTest {
systemProperty "tests.rest.${cluster.name}.transport_hosts", "${-> allTransportSocketURI}"
}
}

testLogging {
events "passed", "skipped", "failed"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import java.io.IOException;
import org.json.JSONObject;
import org.junit.jupiter.api.Test;
import org.opensearch.client.Request;
import org.opensearch.client.ResponseException;

public class CrossClusterSearchIT extends PPLIntegTestCase {

Expand All @@ -41,10 +39,17 @@ public void testCrossClusterSearchAllFields() throws IOException {

@Test
public void testCrossClusterSearchCommandWithLogicalExpression() throws IOException {
JSONObject result =
executeQuery(
String.format(
"search source=%s firstname='Hattie' | fields firstname", TEST_INDEX_BANK_REMOTE));
JSONObject result = executeQuery(String.format(
"search source=%s firstname='Hattie' | fields firstname", TEST_INDEX_BANK_REMOTE));
verifyDataRows(result, rows("Hattie"));
}

@Test
public void testCrossClusterSearchMultiClusters() throws IOException {
JSONObject result = executeQuery(String.format(
"search source=%s,%s firstname='Hattie' | fields firstname", TEST_INDEX_BANK_REMOTE, TEST_INDEX_BANK));
verifyDataRows(result,
rows("Hattie"),
rows("Hattie"));
}
}

0 comments on commit 88bbcc1

Please sign in to comment.