mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-28 02:46:09 +00:00
Fix DataInsights Test (#20239)
This commit is contained in:
parent
c5c724887e
commit
2411a1040e
@ -6,6 +6,7 @@ import static javax.ws.rs.core.Response.Status.NOT_FOUND;
|
|||||||
import static javax.ws.rs.core.Response.Status.OK;
|
import static javax.ws.rs.core.Response.Status.OK;
|
||||||
import static org.openmetadata.common.utils.CommonUtil.listOf;
|
import static org.openmetadata.common.utils.CommonUtil.listOf;
|
||||||
import static org.openmetadata.schema.type.ColumnDataType.INT;
|
import static org.openmetadata.schema.type.ColumnDataType.INT;
|
||||||
|
import static org.openmetadata.service.Entity.getSearchRepository;
|
||||||
import static org.openmetadata.service.util.TestUtils.ADMIN_AUTH_HEADERS;
|
import static org.openmetadata.service.util.TestUtils.ADMIN_AUTH_HEADERS;
|
||||||
import static org.openmetadata.service.util.TestUtils.assertEventually;
|
import static org.openmetadata.service.util.TestUtils.assertEventually;
|
||||||
import static org.openmetadata.service.util.TestUtils.assertResponseContains;
|
import static org.openmetadata.service.util.TestUtils.assertResponseContains;
|
||||||
@ -316,7 +317,13 @@ public class AppsResourceTest extends EntityResourceTest<App, CreateApp> {
|
|||||||
// -------------------------------------------------
|
// -------------------------------------------------
|
||||||
RestClient searchClient = getSearchClient();
|
RestClient searchClient = getSearchClient();
|
||||||
es.org.elasticsearch.client.Response response;
|
es.org.elasticsearch.client.Response response;
|
||||||
Request request = new Request("GET", "di-data-assets-*/_search");
|
String clusterAlias = getSearchRepository().getClusterAlias();
|
||||||
|
String endpointSuffix = "di-data-assets-*";
|
||||||
|
String endpoint =
|
||||||
|
!(clusterAlias == null || clusterAlias.isEmpty())
|
||||||
|
? String.format("%s-%s", clusterAlias, endpointSuffix)
|
||||||
|
: endpointSuffix;
|
||||||
|
Request request = new Request("GET", String.format("%s/_search", endpoint));
|
||||||
String payload =
|
String payload =
|
||||||
String.format(
|
String.format(
|
||||||
"{\"query\":{\"bool\":{\"must\":{\"term\":{\"fullyQualifiedName\":\"%s\"}}}}}",
|
"{\"query\":{\"bool\":{\"must\":{\"term\":{\"fullyQualifiedName\":\"%s\"}}}}}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user