From ea79df4413237e8eb688855a82006e7e7a74f844 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 23 Oct 2018 13:25:00 +0300 Subject: [PATCH] Add a new "contains" feature 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. --- .../test/resources/rest-api-spec/test/stats/10_basic.yml | 3 +++ .../rest-api-spec/test/analysis-common/10_basic.yml | 3 +++ .../test/resources/rest-api-spec/test/ingest/10_basic.yml | 3 +++ .../rest-api-spec/test/lang_expression/10_basic.yml | 3 +++ .../resources/rest-api-spec/test/lang_mustache/10_basic.yml | 3 +++ .../test/resources/rest-api-spec/test/painless/10_basic.yml | 3 +++ .../rest-api-spec/test/repository_url/10_basic.yml | 3 +++ .../src/test/resources/rest-api-spec/test/10_basic.yml | 3 +++ .../rest-api-spec/test/discovery_azure_classic/10_basic.yml | 3 +++ .../resources/rest-api-spec/test/discovery_ec2/10_basic.yml | 3 +++ .../resources/rest-api-spec/test/discovery_gce/10_basic.yml | 3 +++ .../rest-api-spec/test/custom-suggester/10_basic.yml | 3 +++ .../rest-api-spec/test/painless_whitelist/10_basic.yml | 3 +++ .../rest-api-spec/test/example-rescore/10_basic.yml | 3 +++ .../rest-api-spec/test/script_expert_scoring/10_basic.yml | 3 +++ .../rest-api-spec/test/ingest_attachment/10_basic.yml | 3 +++ .../resources/rest-api-spec/test/ingest_geoip/10_basic.yml | 3 +++ .../rest-api-spec/test/ingest-useragent/10_basic.yml | 3 +++ .../rest-api-spec/test/repository_azure/10_basic.yml | 3 +++ .../rest-api-spec/test/repository_gcs/10_basic.yml | 3 +++ .../rest-api-spec/test/hdfs_repository/10_basic.yml | 3 +++ .../rest-api-spec/test/secure_hdfs_repository/10_basic.yml | 3 +++ .../resources/rest-api-spec/test/repository_s3/10_basic.yml | 3 +++ .../resources/rest-api-spec/test/store_smb/10_basic.yml | 3 +++ .../java/org/elasticsearch/test/rest/yaml/Features.java | 4 +++- .../rest-api-spec/test/privileges/40_get_user_privs.yml | 6 ++++++ .../test/resources/rest-api-spec/test/xpack/10_basic.yml | 3 +++ 27 files changed, 84 insertions(+), 1 deletion(-) diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/10_basic.yml b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/10_basic.yml index cde34dfa10760..2416d2b2b3141 100644 --- a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/10_basic.yml +++ b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Matrix Aggs Plugin # "Matrix stats aggs loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/10_basic.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/10_basic.yml index b9b905639fd70..ca6cd2e953be4 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/10_basic.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/10_basic.yml @@ -1,4 +1,7 @@ "Module loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/10_basic.yml b/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/10_basic.yml index eb23b7840ee6a..f83a9e78cb3fe 100644 --- a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/10_basic.yml +++ b/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/10_basic.yml @@ -1,4 +1,7 @@ "Ingest common installed": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yml b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yml index 0ca21cab93089..00ad6f890b0e0 100644 --- a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yml +++ b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Expression scripts # "Expression loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/10_basic.yml b/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/10_basic.yml index 1a014e9cceaa6..0e853d6273142 100644 --- a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/10_basic.yml +++ b/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Mustache scripts # "Mustache loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/10_basic.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/10_basic.yml index 6d008a484ee3f..e442b40ffb845 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/10_basic.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Painless Plugin # "Painless plugin loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml b/modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml index b8181040665a1..1adbfc73bc7b8 100644 --- a/modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml +++ b/modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml @@ -103,6 +103,9 @@ teardown: --- "Module repository-url is loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/modules/transport-netty4/src/test/resources/rest-api-spec/test/10_basic.yml b/modules/transport-netty4/src/test/resources/rest-api-spec/test/10_basic.yml index e8b23fa71408b..19728c7d34cff 100644 --- a/modules/transport-netty4/src/test/resources/rest-api-spec/test/10_basic.yml +++ b/modules/transport-netty4/src/test/resources/rest-api-spec/test/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Netty transport # "Netty loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yml b/plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yml index 6d12da177ea66..39aa9929f8a92 100644 --- a/plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yml +++ b/plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Azure Classic Discovery component # "Discovery Azure Classic loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/discovery-ec2/src/test/resources/rest-api-spec/test/discovery_ec2/10_basic.yml b/plugins/discovery-ec2/src/test/resources/rest-api-spec/test/discovery_ec2/10_basic.yml index 3c5866663b94b..ba51c623fe888 100644 --- a/plugins/discovery-ec2/src/test/resources/rest-api-spec/test/discovery_ec2/10_basic.yml +++ b/plugins/discovery-ec2/src/test/resources/rest-api-spec/test/discovery_ec2/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Discovery EC2 component # "Discovery EC2 loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/discovery-gce/src/test/resources/rest-api-spec/test/discovery_gce/10_basic.yml b/plugins/discovery-gce/src/test/resources/rest-api-spec/test/discovery_gce/10_basic.yml index f16599c40fa32..a5379c2c68bed 100644 --- a/plugins/discovery-gce/src/test/resources/rest-api-spec/test/discovery_gce/10_basic.yml +++ b/plugins/discovery-gce/src/test/resources/rest-api-spec/test/discovery_gce/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for Discovery GCE components # "Discovery GCE loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/examples/custom-suggester/src/test/resources/rest-api-spec/test/custom-suggester/10_basic.yml b/plugins/examples/custom-suggester/src/test/resources/rest-api-spec/test/custom-suggester/10_basic.yml index 29fbcdac99dd3..ed8d0f78a092b 100644 --- a/plugins/examples/custom-suggester/src/test/resources/rest-api-spec/test/custom-suggester/10_basic.yml +++ b/plugins/examples/custom-suggester/src/test/resources/rest-api-spec/test/custom-suggester/10_basic.yml @@ -1,6 +1,9 @@ # tests that the custom suggester plugin is installed --- "plugin loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/examples/painless-whitelist/src/test/resources/rest-api-spec/test/painless_whitelist/10_basic.yml b/plugins/examples/painless-whitelist/src/test/resources/rest-api-spec/test/painless_whitelist/10_basic.yml index a915c08067e5c..1b8870582375d 100644 --- a/plugins/examples/painless-whitelist/src/test/resources/rest-api-spec/test/painless_whitelist/10_basic.yml +++ b/plugins/examples/painless-whitelist/src/test/resources/rest-api-spec/test/painless_whitelist/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for the painless whitelist example plugin # "Plugin loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/examples/rescore/src/test/resources/rest-api-spec/test/example-rescore/10_basic.yml b/plugins/examples/rescore/src/test/resources/rest-api-spec/test/example-rescore/10_basic.yml index 62a47df9d7869..f0d0bcb35fad9 100644 --- a/plugins/examples/rescore/src/test/resources/rest-api-spec/test/example-rescore/10_basic.yml +++ b/plugins/examples/rescore/src/test/resources/rest-api-spec/test/example-rescore/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for the expert scoring script example plugin # "Plugin loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/examples/script-expert-scoring/src/test/resources/rest-api-spec/test/script_expert_scoring/10_basic.yml b/plugins/examples/script-expert-scoring/src/test/resources/rest-api-spec/test/script_expert_scoring/10_basic.yml index 26980a95b730b..70842d5e767e5 100644 --- a/plugins/examples/script-expert-scoring/src/test/resources/rest-api-spec/test/script_expert_scoring/10_basic.yml +++ b/plugins/examples/script-expert-scoring/src/test/resources/rest-api-spec/test/script_expert_scoring/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for the expert scoring script example plugin # "Plugin loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/ingest-attachment/src/test/resources/rest-api-spec/test/ingest_attachment/10_basic.yml b/plugins/ingest-attachment/src/test/resources/rest-api-spec/test/ingest_attachment/10_basic.yml index 42be90f77f944..607fa5bf8b781 100644 --- a/plugins/ingest-attachment/src/test/resources/rest-api-spec/test/ingest_attachment/10_basic.yml +++ b/plugins/ingest-attachment/src/test/resources/rest-api-spec/test/ingest_attachment/10_basic.yml @@ -1,4 +1,7 @@ "Ingest attachment plugin installed": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/10_basic.yml b/plugins/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/10_basic.yml index 413745eab4051..ef6346d425645 100644 --- a/plugins/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/10_basic.yml +++ b/plugins/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/10_basic.yml @@ -1,4 +1,7 @@ "Ingest plugin installed": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/10_basic.yml b/plugins/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/10_basic.yml index 4cb1c9b1fba20..8fef34604b75d 100644 --- a/plugins/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/10_basic.yml +++ b/plugins/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/10_basic.yml @@ -1,4 +1,7 @@ "ingest-user-agent plugin installed": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/repository-azure/src/test/resources/rest-api-spec/test/repository_azure/10_basic.yml b/plugins/repository-azure/src/test/resources/rest-api-spec/test/repository_azure/10_basic.yml index 199d543dda87e..fe21a295e37bb 100644 --- a/plugins/repository-azure/src/test/resources/rest-api-spec/test/repository_azure/10_basic.yml +++ b/plugins/repository-azure/src/test/resources/rest-api-spec/test/repository_azure/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for repository-azure # "Plugin repository-azure is loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/repository-gcs/src/test/resources/rest-api-spec/test/repository_gcs/10_basic.yml b/plugins/repository-gcs/src/test/resources/rest-api-spec/test/repository_gcs/10_basic.yml index 5c8fa70bb7a5f..072836280b3bc 100644 --- a/plugins/repository-gcs/src/test/resources/rest-api-spec/test/repository_gcs/10_basic.yml +++ b/plugins/repository-gcs/src/test/resources/rest-api-spec/test/repository_gcs/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for repository-gcs # "Plugin repository-gcs is loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/hdfs_repository/10_basic.yml b/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/hdfs_repository/10_basic.yml index f11e0148402cf..bc419d75ba773 100644 --- a/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/hdfs_repository/10_basic.yml +++ b/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/hdfs_repository/10_basic.yml @@ -3,6 +3,9 @@ # Check plugin is installed # "Plugin loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/secure_hdfs_repository/10_basic.yml b/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/secure_hdfs_repository/10_basic.yml index f11e0148402cf..bc419d75ba773 100644 --- a/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/secure_hdfs_repository/10_basic.yml +++ b/plugins/repository-hdfs/src/test/resources/rest-api-spec/test/secure_hdfs_repository/10_basic.yml @@ -3,6 +3,9 @@ # Check plugin is installed # "Plugin loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/repository-s3/src/test/resources/rest-api-spec/test/repository_s3/10_basic.yml b/plugins/repository-s3/src/test/resources/rest-api-spec/test/repository_s3/10_basic.yml index 190a628f0b375..cde14321805f5 100644 --- a/plugins/repository-s3/src/test/resources/rest-api-spec/test/repository_s3/10_basic.yml +++ b/plugins/repository-s3/src/test/resources/rest-api-spec/test/repository_s3/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for repository-s3 # "Plugin repository-s3 is loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/plugins/store-smb/src/test/resources/rest-api-spec/test/store_smb/10_basic.yml b/plugins/store-smb/src/test/resources/rest-api-spec/test/store_smb/10_basic.yml index 60228c1b92356..8956b3a8c116f 100644 --- a/plugins/store-smb/src/test/resources/rest-api-spec/test/store_smb/10_basic.yml +++ b/plugins/store-smb/src/test/resources/rest-api-spec/test/store_smb/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for SMB Store component # "SMB Store loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {} diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/Features.java b/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/Features.java index cfce0653d31c2..d3fb500ac051a 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/Features.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/Features.java @@ -46,7 +46,9 @@ public final class Features { "stash_in_path", "stash_path_replace", "warnings", - "yaml")); + "yaml", + "contains" + )); private Features() { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/privileges/40_get_user_privs.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/privileges/40_get_user_privs.yml index eccd37565c724..2019d4586a7ab 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/privileges/40_get_user_privs.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/privileges/40_get_user_privs.yml @@ -202,6 +202,9 @@ teardown: --- "Test get_user_privileges for single role": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: headers: { Authorization: "Basic dGVzdC0xOjEyMzQ1Njc4" } # test-1 xpack.security.get_user_privileges: {} @@ -261,6 +264,9 @@ teardown: --- "Test get_user_privileges for merged roles": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: headers: { Authorization: "Basic dGVzdC0zOjEyMzQ1Njc4" } # test-3 xpack.security.get_user_privileges: {} diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/10_basic.yml index 2aea0126e9e47..47e1a1160b580 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/10_basic.yml @@ -1,6 +1,9 @@ # Integration tests for monitoring # "X-Pack loaded": + - skip: + reason: "contains is a newly added assertion" + features: contains - do: cluster.state: {}