File tree Expand file tree Collapse file tree 4 files changed +41
-90
lines changed
full-cluster-restart/src/test/java/org/elasticsearch/upgrades
x-pack/qa/full-cluster-restart
src/test/java/org/elasticsearch/xpack/restart Expand file tree Collapse file tree 4 files changed +41
-90
lines changed Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
- package org .elasticsearch .bwc ;
20
+ package org .elasticsearch .upgrades ;
21
21
22
22
import org .apache .http .util .EntityUtils ;
23
23
import org .elasticsearch .Version ;
@@ -153,6 +153,21 @@ protected boolean preserveIndicesUponCompletion() {
153
153
return true ;
154
154
}
155
155
156
+ @ Override
157
+ protected boolean preserveSnapshotsUponCompletion () {
158
+ return true ;
159
+ }
160
+
161
+ @ Override
162
+ protected boolean preserveReposUponCompletion () {
163
+ return true ;
164
+ }
165
+
166
+ @ Override
167
+ protected boolean preserveTemplatesUponCompletion () {
168
+ return true ;
169
+ }
170
+
156
171
public void testQueryBuilderBWC () throws Exception {
157
172
String index = "queries" ;
158
173
if (runningAgainstOldCluster ) {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ subprojects {
184
184
systemProperty ' tests.old_cluster_version' , version. toString(). minus(" -SNAPSHOT" )
185
185
systemProperty ' tests.path.repo' , new File (buildDir, " cluster/shared/repo" )
186
186
exclude ' org/elasticsearch/upgrades/FullClusterRestartIT.class'
187
+ exclude ' org/elasticsearch/upgrades/QueryBuilderBWCIT.class'
187
188
}
188
189
189
190
Task upgradedClusterTest = tasks. create(name : " ${ baseName} #upgradedClusterTest" , type : RestIntegTestTask )
@@ -222,6 +223,7 @@ subprojects {
222
223
systemProperty ' tests.old_cluster_version' , version. toString(). minus(" -SNAPSHOT" )
223
224
systemProperty ' tests.path.repo' , new File (buildDir, " cluster/shared/repo" )
224
225
exclude ' org/elasticsearch/upgrades/FullClusterRestartIT.class'
226
+ exclude ' org/elasticsearch/upgrades/QueryBuilderBWCIT.class'
225
227
}
226
228
227
229
Task versionBwcTest = tasks. create(name : " ${ baseName} #bwcTest" ) {
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License;
4
+ * you may not use this file except in compliance with the Elastic License.
5
+ */
6
+ package org .elasticsearch .xpack .restart ;
7
+
8
+ import org .elasticsearch .common .settings .Settings ;
9
+ import org .elasticsearch .common .util .concurrent .ThreadContext ;
10
+
11
+ import java .nio .charset .StandardCharsets ;
12
+ import java .util .Base64 ;
13
+
14
+ public class QueryBuilderBWCIT extends org .elasticsearch .upgrades .QueryBuilderBWCIT {
15
+
16
+ @ Override
17
+ protected Settings restClientSettings () {
18
+ String token = "Basic " + Base64 .getEncoder ().encodeToString ("test_user:x-pack-test-password" .getBytes (StandardCharsets .UTF_8 ));
19
+ return Settings .builder ()
20
+ .put (ThreadContext .PREFIX + ".Authorization" , token )
21
+ .build ();
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments