Skip to content

Commit 5953696

Browse files
authored
Add a new "contains" feature (#34738)
The contains syntax was added in #30874 but the skips were not properly put in place. The java runner has the feature so the tests will run as part of the build, but language clients will be able to support it at their own pace.
1 parent 153157e commit 5953696

File tree

27 files changed

+84
-1
lines changed
  • modules
    • aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats
    • analysis-common/src/test/resources/rest-api-spec/test/analysis-common
    • ingest-common/src/test/resources/rest-api-spec/test/ingest
    • lang-expression/src/test/resources/rest-api-spec/test/lang_expression
    • lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache
    • lang-painless/src/test/resources/rest-api-spec/test/painless
    • repository-url/src/test/resources/rest-api-spec/test/repository_url
    • transport-netty4/src/test/resources/rest-api-spec/test
  • plugins
    • discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic
    • discovery-ec2/src/test/resources/rest-api-spec/test/discovery_ec2
    • discovery-gce/src/test/resources/rest-api-spec/test/discovery_gce
    • examples
      • custom-suggester/src/test/resources/rest-api-spec/test/custom-suggester
      • painless-whitelist/src/test/resources/rest-api-spec/test/painless_whitelist
      • rescore/src/test/resources/rest-api-spec/test/example-rescore
      • script-expert-scoring/src/test/resources/rest-api-spec/test/script_expert_scoring
    • ingest-attachment/src/test/resources/rest-api-spec/test/ingest_attachment
    • ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip
    • ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent
    • repository-azure/src/test/resources/rest-api-spec/test/repository_azure
    • repository-gcs/src/test/resources/rest-api-spec/test/repository_gcs
    • repository-hdfs/src/test/resources/rest-api-spec/test
    • repository-s3/src/test/resources/rest-api-spec/test/repository_s3
    • store-smb/src/test/resources/rest-api-spec/test/store_smb
  • test/framework/src/main/java/org/elasticsearch/test/rest/yaml
  • x-pack/plugin/src/test/resources/rest-api-spec/test

27 files changed

+84
-1
lines changed

modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Matrix Aggs Plugin
22
#
33
"Matrix stats aggs loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
"Module loaded":
2+
- skip:
3+
reason: "contains is a newly added assertion"
4+
features: contains
25
- do:
36
cluster.state: {}
47

modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
"Ingest common installed":
2+
- skip:
3+
reason: "contains is a newly added assertion"
4+
features: contains
25
- do:
36
cluster.state: {}
47

modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Expression scripts
22
#
33
"Expression loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Mustache scripts
22
#
33
"Mustache loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

modules/lang-painless/src/test/resources/rest-api-spec/test/painless/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Painless Plugin
22
#
33
"Painless plugin loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ teardown:
103103

104104
---
105105
"Module repository-url is loaded":
106+
- skip:
107+
reason: "contains is a newly added assertion"
108+
features: contains
106109
- do:
107110
cluster.state: {}
108111

modules/transport-netty4/src/test/resources/rest-api-spec/test/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Netty transport
22
#
33
"Netty loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Azure Classic Discovery component
22
#
33
"Discovery Azure Classic loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/discovery-ec2/src/test/resources/rest-api-spec/test/discovery_ec2/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Discovery EC2 component
22
#
33
"Discovery EC2 loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/discovery-gce/src/test/resources/rest-api-spec/test/discovery_gce/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for Discovery GCE components
22
#
33
"Discovery GCE loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/examples/custom-suggester/src/test/resources/rest-api-spec/test/custom-suggester/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# tests that the custom suggester plugin is installed
22
---
33
"plugin loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/examples/painless-whitelist/src/test/resources/rest-api-spec/test/painless_whitelist/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for the painless whitelist example plugin
22
#
33
"Plugin loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/examples/rescore/src/test/resources/rest-api-spec/test/example-rescore/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for the expert scoring script example plugin
22
#
33
"Plugin loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/examples/script-expert-scoring/src/test/resources/rest-api-spec/test/script_expert_scoring/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for the expert scoring script example plugin
22
#
33
"Plugin loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/ingest-attachment/src/test/resources/rest-api-spec/test/ingest_attachment/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
"Ingest attachment plugin installed":
2+
- skip:
3+
reason: "contains is a newly added assertion"
4+
features: contains
25
- do:
36
cluster.state: {}
47

plugins/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
"Ingest plugin installed":
2+
- skip:
3+
reason: "contains is a newly added assertion"
4+
features: contains
25
- do:
36
cluster.state: {}
47

plugins/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
"ingest-user-agent plugin installed":
2+
- skip:
3+
reason: "contains is a newly added assertion"
4+
features: contains
25
- do:
36
cluster.state: {}
47

plugins/repository-azure/src/test/resources/rest-api-spec/test/repository_azure/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for repository-azure
22
#
33
"Plugin repository-azure is loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/repository-gcs/src/test/resources/rest-api-spec/test/repository_gcs/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for repository-gcs
22
#
33
"Plugin repository-gcs is loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/repository-hdfs/src/test/resources/rest-api-spec/test/hdfs_repository/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Check plugin is installed
44
#
55
"Plugin loaded":
6+
- skip:
7+
reason: "contains is a newly added assertion"
8+
features: contains
69
- do:
710
cluster.state: {}
811

plugins/repository-hdfs/src/test/resources/rest-api-spec/test/secure_hdfs_repository/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Check plugin is installed
44
#
55
"Plugin loaded":
6+
- skip:
7+
reason: "contains is a newly added assertion"
8+
features: contains
69
- do:
710
cluster.state: {}
811

plugins/repository-s3/src/test/resources/rest-api-spec/test/repository_s3/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for repository-s3
22
#
33
"Plugin repository-s3 is loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

plugins/store-smb/src/test/resources/rest-api-spec/test/store_smb/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for SMB Store component
22
#
33
"SMB Store loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

test/framework/src/main/java/org/elasticsearch/test/rest/yaml/Features.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public final class Features {
4646
"stash_in_path",
4747
"stash_path_replace",
4848
"warnings",
49-
"yaml"));
49+
"yaml",
50+
"contains"
51+
));
5052

5153
private Features() {
5254

x-pack/plugin/src/test/resources/rest-api-spec/test/privileges/40_get_user_privs.yml

+6
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ teardown:
202202
---
203203

204204
"Test get_user_privileges for single role":
205+
- skip:
206+
reason: "contains is a newly added assertion"
207+
features: contains
205208
- do:
206209
headers: { Authorization: "Basic dGVzdC0xOjEyMzQ1Njc4" } # test-1
207210
xpack.security.get_user_privileges: {}
@@ -261,6 +264,9 @@ teardown:
261264
---
262265

263266
"Test get_user_privileges for merged roles":
267+
- skip:
268+
reason: "contains is a newly added assertion"
269+
features: contains
264270
- do:
265271
headers: { Authorization: "Basic dGVzdC0zOjEyMzQ1Njc4" } # test-3
266272
xpack.security.get_user_privileges: {}

x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/10_basic.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Integration tests for monitoring
22
#
33
"X-Pack loaded":
4+
- skip:
5+
reason: "contains is a newly added assertion"
6+
features: contains
47
- do:
58
cluster.state: {}
69

0 commit comments

Comments
 (0)