Skip to content

Commit 43eaec3

Browse files
committed
Fixes ExplainLifecycleRequestTests
1 parent 9fd4f3f commit 43eaec3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/action/ExplainLifecycleRequestTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
import org.elasticsearch.xpack.core.indexlifecycle.action.ExplainLifecycleAction.Request;
1313

1414
import java.io.IOException;
15+
import java.util.Arrays;
1516

1617
public class ExplainLifecycleRequestTests extends AbstractWireSerializingTestCase<Request> {
1718

1819
@Override
1920
protected Request createTestInstance() {
2021
Request request = new Request();
2122
if (randomBoolean()) {
22-
request.indices(generateRandomStringArray(20, 20, false, false));
23+
request.indices(generateRandomStringArray(20, 20, false, true));
2324
}
2425
if (randomBoolean()) {
2526
IndicesOptions indicesOptions = IndicesOptions.fromOptions(randomBoolean(), randomBoolean(), randomBoolean(), randomBoolean(),
@@ -35,7 +36,8 @@ protected Request mutateInstance(Request instance) throws IOException {
3536
IndicesOptions indicesOptions = instance.indicesOptions();
3637
switch (between(0, 1)) {
3738
case 0:
38-
indices = generateRandomStringArray(20, 10, false, false);
39+
indices = randomValueOtherThanMany(i -> Arrays.equals(i, instance.indices()),
40+
() -> generateRandomStringArray(20, 10, false, true));
3941
break;
4042
case 1:
4143
indicesOptions = randomValueOtherThan(indicesOptions, () -> IndicesOptions.fromOptions(randomBoolean(), randomBoolean(),

0 commit comments

Comments
 (0)