Skip to content

Commit

Permalink
Fix SystemAliasIT
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Sep 10, 2024
1 parent 59f3ed4 commit 4ec1441
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package org.elasticsearch.system.indices;

import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
Expand Down Expand Up @@ -41,6 +42,7 @@ public void testCreatingSystemIndexWithAlias() throws Exception {
{
Request request = new Request("PUT", "/.internal-unmanaged-index-8");
request.setJsonEntity("{\"aliases\": {\".internal-unmanaged-alias\": {}}}");
request.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("X-elastic-product-origin", "elastic"));
Response response = client().performRequest(request);
assertThat(response.getStatusLine().getStatusCode(), is(200));
}
Expand All @@ -67,6 +69,7 @@ public void testCreatingSystemIndexWithLegacyAlias() throws Exception {

{
Request request = new Request("PUT", "/.internal-unmanaged-index-8");
request.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("X-elastic-product-origin", "elastic"));
Response response = client().performRequest(request);
assertThat(response.getStatusLine().getStatusCode(), is(200));
}
Expand All @@ -78,6 +81,7 @@ public void testCreatingSystemIndexWithLegacyAlias() throws Exception {
public void testCreatingSystemIndexWithIndexAliasEndpoint() throws Exception {
{
Request request = new Request("PUT", "/.internal-unmanaged-index-8");
request.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("X-elastic-product-origin", "elastic"));
Response response = client().performRequest(request);
assertThat(response.getStatusLine().getStatusCode(), is(200));
}
Expand All @@ -101,6 +105,7 @@ public void testCreatingSystemIndexWithIndexAliasEndpoint() throws Exception {
public void testCreatingSystemIndexWithAliasEndpoint() throws Exception {
{
Request request = new Request("PUT", "/.internal-unmanaged-index-8");
request.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("X-elastic-product-origin", "elastic"));
Response response = client().performRequest(request);
assertThat(response.getStatusLine().getStatusCode(), is(200));
}
Expand All @@ -125,6 +130,7 @@ public void testCreatingSystemIndexWithAliasEndpoint() throws Exception {
public void testCreatingSystemIndexWithAliasesEndpoint() throws Exception {
{
Request request = new Request("PUT", "/.internal-unmanaged-index-8");
request.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("X-elastic-product-origin", "elastic"));
Response response = client().performRequest(request);
assertThat(response.getStatusLine().getStatusCode(), is(200));
}
Expand Down

0 comments on commit 4ec1441

Please sign in to comment.