fix(opensearch): return endpoint without scheme (#7766)

Closes #7707
This commit is contained in:
Alexy Grabov authored and GitHub committed 2026-11-08 18:37:00 -04:00
1 parent 3701d4d041
commit 6e3bdaf9ef
4 files changed
+59 -2

No files matched your search

@@ -92,6 +92,11 @@ class OpenSearchTest {
assertThat(response.domainStatus().domainName()).isEqualTo(DOMAIN_NAME);
domainEndpoint = response.domainStatus().endpoint();
assertThat(domainEndpoint).doesNotStartWith("http://").doesNotStartWith("https://");
DescribeDomainsResponse bulk = opensearch.describeDomains(DescribeDomainsRequest.builder()
.domainNames(DOMAIN_NAME).build());
assertThat(bulk.domainStatusList()).singleElement()
.satisfies(status -> assertThat(status.endpoint()).isEqualTo(domainEndpoint));
}
@Test
@@ -156,7 +161,7 @@ class OpenSearchTest {
try {
HttpURLConnection conn = (HttpURLConnection)
URI.create(domainEndpoint + "/_cluster/health").toURL().openConnection();
URI.create("http://" + domainEndpoint + "/_cluster/health").toURL().openConnection();
conn.setConnectTimeout(5000);
conn.setReadTimeout(5000);
int code = conn.getResponseCode();