@@ -63,18 +63,18 @@ public void testGeneratingTokensInOldCluster() throws Exception {
63
63
{
64
64
Version minimumIndexCompatibilityVersion = Version .CURRENT .minimumIndexCompatibilityVersion ();
65
65
assertThat ("this branch is not needed if we aren't compatible with 6.0" ,
66
- minimumIndexCompatibilityVersion .onOrBefore (Version .V_6_0_0 ), equalTo (true ));
66
+ minimumIndexCompatibilityVersion .onOrBefore (Version .V_6_0_0 ), equalTo (true ));
67
67
if (minimumIndexCompatibilityVersion .before (Version .V_7_0_0 )) {
68
68
XContentBuilder template = jsonBuilder ();
69
69
template .startObject ();
70
70
{
71
- template .field ("index_patterns" , "* " );
71
+ template .field ("index_patterns" , "token_backwards_compatibility_it " );
72
72
template .startObject ("settings" );
73
73
template .field ("number_of_shards" , 5 );
74
74
template .endObject ();
75
75
}
76
76
template .endObject ();
77
- Request createTemplate = new Request ("PUT" , "/_template/template" );
77
+ Request createTemplate = new Request ("PUT" , "/_template/gen-tokens-old-cluster- template" );
78
78
createTemplate .setJsonEntity (Strings .toString (template ));
79
79
client ().performRequest (createTemplate );
80
80
}
@@ -105,18 +105,18 @@ public void testRefreshingTokensInOldCluster() throws Exception {
105
105
{
106
106
Version minimumIndexCompatibilityVersion = Version .CURRENT .minimumIndexCompatibilityVersion ();
107
107
assertThat ("this branch is not needed if we aren't compatible with 6.0" ,
108
- minimumIndexCompatibilityVersion .onOrBefore (Version .V_6_0_0 ), equalTo (true ));
108
+ minimumIndexCompatibilityVersion .onOrBefore (Version .V_6_0_0 ), equalTo (true ));
109
109
if (minimumIndexCompatibilityVersion .before (Version .V_7_0_0 )) {
110
110
XContentBuilder template = jsonBuilder ();
111
111
template .startObject ();
112
112
{
113
- template .field ("index_patterns" , "* " );
113
+ template .field ("index_patterns" , "token_backwards_compatibility_it " );
114
114
template .startObject ("settings" );
115
115
template .field ("number_of_shards" , 5 );
116
116
template .endObject ();
117
117
}
118
118
template .endObject ();
119
- Request createTemplate = new Request ("PUT" , "/_template/template" );
119
+ Request createTemplate = new Request ("PUT" , "/_template/refresh-tokens-old-cluster- template" );
120
120
createTemplate .setJsonEntity (Strings .toString (template ));
121
121
client ().performRequest (createTemplate );
122
122
}
@@ -150,18 +150,18 @@ public void testInvalidatingTokensInOldCluster() throws Exception {
150
150
{
151
151
Version minimumIndexCompatibilityVersion = Version .CURRENT .minimumIndexCompatibilityVersion ();
152
152
assertThat ("this branch is not needed if we aren't compatible with 6.0" ,
153
- minimumIndexCompatibilityVersion .onOrBefore (Version .V_6_0_0 ), equalTo (true ));
153
+ minimumIndexCompatibilityVersion .onOrBefore (Version .V_6_0_0 ), equalTo (true ));
154
154
if (minimumIndexCompatibilityVersion .before (Version .V_7_0_0 )) {
155
155
XContentBuilder template = jsonBuilder ();
156
156
template .startObject ();
157
157
{
158
- template .field ("index_patterns" , "* " );
158
+ template .field ("index_patterns" , "token_backwards_compatibility_it " );
159
159
template .startObject ("settings" );
160
160
template .field ("number_of_shards" , 5 );
161
161
template .endObject ();
162
162
}
163
163
template .endObject ();
164
- Request createTemplate = new Request ("PUT" , "/_template/template" );
164
+ Request createTemplate = new Request ("PUT" , "/_template/invalid-tokens-old-cluster- template" );
165
165
createTemplate .setJsonEntity (Strings .toString (template ));
166
166
client ().performRequest (createTemplate );
167
167
}
@@ -228,7 +228,7 @@ public void testGeneratingTokensInMixedCluster() throws Exception {
228
228
}
229
229
230
230
public void testRefreshingTokensInMixedCluster () throws Exception {
231
- // verify new nodes can refresh tokens created by old nodes and vice versa
231
+ // verify new nodes can refresh tokens created by old nodes and vice versa
232
232
assumeTrue ("this test should only run against the mixed cluster" , CLUSTER_TYPE == ClusterType .MIXED );
233
233
for (RestClient client1 : twoClients ) {
234
234
Map <String , Object > responseMap = createTokens (client1 , "test_user" , "x-pack-test-password" );
0 commit comments