Skip to content

Commit 6bf3063

Browse files
committed
add test feature for test
1 parent 14ff3e4 commit 6bf3063

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888

8989
---
9090
"Throw exception for unsupported value type":
91+
- requires:
92+
cluster_features: [ "index.throw_exception_on_index_creation_if_unsupported_value_type_in_alias" ]
93+
reason: "Throw exception on index creation if unsupported value type in alias"
9194

9295
- do:
9396
catch: /Unsupported String type value \[true\] for field \[is_write_index\] in alias \[test_alias\]/

server/src/main/java/org/elasticsearch/index/IndexFeatures.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,16 @@ public Set<NodeFeature> getFeatures() {
2525

2626
private static final NodeFeature SYNONYMS_SET_LENIENT_ON_NON_EXISTING = new NodeFeature("index.synonyms_set_lenient_on_non_existing");
2727

28+
private static final NodeFeature THROW_EXCEPTION_ON_INDEX_CREATION_IF_UNSUPPORTED_VALUE_TYPE_IN_ALIAS = new NodeFeature(
29+
"index.throw_exception_on_index_creation_if_unsupported_value_type_in_alias"
30+
);
31+
2832
@Override
2933
public Set<NodeFeature> getTestFeatures() {
30-
return Set.of(LOGSDB_NO_HOST_NAME_FIELD, SYNONYMS_SET_LENIENT_ON_NON_EXISTING);
34+
return Set.of(
35+
LOGSDB_NO_HOST_NAME_FIELD,
36+
SYNONYMS_SET_LENIENT_ON_NON_EXISTING,
37+
THROW_EXCEPTION_ON_INDEX_CREATION_IF_UNSUPPORTED_VALUE_TYPE_IN_ALIAS
38+
);
3139
}
3240
}

0 commit comments

Comments
 (0)