Skip to content

Commit

Permalink
Fix DataStreamsRestIT
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Sep 10, 2024
1 parent ee58326 commit 07084ee
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package org.elasticsearch.datastreams;

import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
Expand Down Expand Up @@ -70,10 +71,12 @@ public void testHiddenDataStreamImplicitHiddenSearch() throws IOException {
// Create a template
Request putComposableIndexTemplateRequest = new Request("POST", "/_index_template/hidden");
putComposableIndexTemplateRequest.setJsonEntity("{\"index_patterns\": [\".hidden\"], \"data_stream\": {\"hidden\": true}}");
putComposableIndexTemplateRequest.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("X-elastic-product-origin", "elastic"));
assertOK(client().performRequest(putComposableIndexTemplateRequest));

Request createDocRequest = new Request("POST", "/.hidden/_doc?refresh=true");
createDocRequest.setJsonEntity("{ \"@timestamp\": \"2020-10-22\", \"a\": 1 }");
createDocRequest.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("X-elastic-product-origin", "elastic"));

assertOK(client().performRequest(createDocRequest));

Expand Down

0 comments on commit 07084ee

Please sign in to comment.