|
13 | 13 | import org.elasticsearch.common.settings.SecureString;
|
14 | 14 | import org.elasticsearch.common.settings.Settings;
|
15 | 15 | import org.elasticsearch.common.util.concurrent.ThreadContext;
|
| 16 | +import org.elasticsearch.test.cluster.ElasticsearchCluster; |
| 17 | +import org.elasticsearch.test.cluster.FeatureFlag; |
| 18 | +import org.elasticsearch.test.cluster.local.distribution.DistributionType; |
16 | 19 | import org.elasticsearch.test.rest.ESRestTestCase;
|
17 | 20 | import org.elasticsearch.xcontent.XContentParser;
|
18 | 21 | import org.elasticsearch.xcontent.XContentParserConfiguration;
|
19 | 22 | import org.elasticsearch.xcontent.json.JsonXContent;
|
| 23 | +import org.junit.ClassRule; |
20 | 24 |
|
21 | 25 | import java.util.List;
|
22 | 26 | import java.util.Map;
|
|
27 | 31 |
|
28 | 32 | public class DataStreamRestIT extends ESRestTestCase {
|
29 | 33 |
|
| 34 | + @ClassRule |
| 35 | + public static ElasticsearchCluster cluster = ElasticsearchCluster.local() |
| 36 | + .distribution(DistributionType.DEFAULT) |
| 37 | + .setting("xpack.security.enabled", "true") |
| 38 | + .setting("xpack.license.self_generated.type", "trial") |
| 39 | + .setting("indices.lifecycle.history_index_enabled", "false") |
| 40 | + .feature(FeatureFlag.FAILURE_STORE_ENABLED) |
| 41 | + .keystore("bootstrap.password", "x-pack-test-password") |
| 42 | + .user("x_pack_rest_user", "x-pack-test-password") |
| 43 | + .systemProperty("es.queryable_built_in_roles_enabled", "false") |
| 44 | + .build(); |
| 45 | + |
30 | 46 | private static final String BASIC_AUTH_VALUE = basicAuthHeaderValue("x_pack_rest_user", new SecureString("x-pack-test-password"));
|
31 | 47 |
|
32 | 48 | @Override
|
@@ -143,4 +159,9 @@ private void putFailureStoreTemplate() {
|
143 | 159 | throw new RuntimeException(e);
|
144 | 160 | }
|
145 | 161 | }
|
| 162 | + |
| 163 | + @Override |
| 164 | + protected String getTestRestCluster() { |
| 165 | + return cluster.getHttpAddresses(); |
| 166 | + } |
146 | 167 | }
|
0 commit comments