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 1717 * under the License.
1818 */
1919
20- package org .elasticsearch .bwc ;
20+ package org .elasticsearch .upgrades ;
2121
2222import org .apache .http .util .EntityUtils ;
2323import org .elasticsearch .Version ;
@@ -153,6 +153,21 @@ protected boolean preserveIndicesUponCompletion() {
153153 return true ;
154154 }
155155
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+
156171 public void testQueryBuilderBWC () throws Exception {
157172 String index = "queries" ;
158173 if (runningAgainstOldCluster ) {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ subprojects {
184184 systemProperty ' tests.old_cluster_version' , version. toString(). minus(" -SNAPSHOT" )
185185 systemProperty ' tests.path.repo' , new File (buildDir, " cluster/shared/repo" )
186186 exclude ' org/elasticsearch/upgrades/FullClusterRestartIT.class'
187+ exclude ' org/elasticsearch/upgrades/QueryBuilderBWCIT.class'
187188 }
188189
189190 Task upgradedClusterTest = tasks. create(name : " ${ baseName} #upgradedClusterTest" , type : RestIntegTestTask )
@@ -222,6 +223,7 @@ subprojects {
222223 systemProperty ' tests.old_cluster_version' , version. toString(). minus(" -SNAPSHOT" )
223224 systemProperty ' tests.path.repo' , new File (buildDir, " cluster/shared/repo" )
224225 exclude ' org/elasticsearch/upgrades/FullClusterRestartIT.class'
226+ exclude ' org/elasticsearch/upgrades/QueryBuilderBWCIT.class'
225227 }
226228
227229 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