From 91a0ea1786f30359c97dd5cefc419570bf2813de Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 9 Dec 2021 15:24:12 +0000 Subject: [PATCH] [XPACK] Adds skipped tests to compatibility suite --- .../spec/rest_yaml_tests_helper.rb | 7 +- elasticsearch-xpack/spec/skipped_tests_8.yml | 86 +++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-xpack/spec/skipped_tests_8.yml diff --git a/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb b/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb index 83bf97d84f..368d2d9b2a 100644 --- a/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb +++ b/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb @@ -21,6 +21,10 @@ require "#{File.expand_path(File.dirname('..'), '..')}/api-spec-testing/wipe_cluster_8" include Elasticsearch::RestAPIYAMLTests +def testing_compatibility? + [1, true, 'true'].include?(ENV['ELASTIC_CLIENT_APIVERSIONING']) +end + PROJECT_PATH = File.join(File.dirname(__FILE__), '..', '..') TRANSPORT_OPTIONS = if [true, 'true', 1].include? ENV['ELASTIC_CLIENT_APIVERSIONING'] @@ -72,7 +76,7 @@ end end -tests_dir = [true, 'true'].include?(ENV['ELASTIC_CLIENT_APIVERSIONING']) ? 'compatTest' : 'test' +tests_dir = testing_compatibility? ? 'compatTest' : 'test' YAML_FILES_DIRECTORY = "#{PROJECT_PATH}/tmp/rest-api-spec/#{tests_dir}/platinum".freeze SINGLE_TEST = if ENV['SINGLE_TEST'] && !ENV['SINGLE_TEST'].empty? @@ -91,6 +95,7 @@ # Skipped tests file = File.expand_path(__dir__ + '/skipped_tests.yml') skipped_tests = YAML.load_file(file) +skipped_tests.concat YAML.load_file(File.expand_path(__dir__ + '/skipped_tests_8.yml')) if testing_compatibility? # The directory of rest api YAML files. REST_API_YAML_FILES = if ENV['RUN_SKIPPED_TESTS'] # only run the skipped tests if true diff --git a/elasticsearch-xpack/spec/skipped_tests_8.yml b/elasticsearch-xpack/spec/skipped_tests_8.yml new file mode 100644 index 0000000000..0baa7980c2 --- /dev/null +++ b/elasticsearch-xpack/spec/skipped_tests_8.yml @@ -0,0 +1,86 @@ +# error: "no handler found for uri [/.ds-simple-data-stream1-%2A000001/_freeze] and method [POST]" +- + :file: 'indices.freeze/10_basic.yml' + :description: 'Cannot freeze write index for data stream' + +# Expected Length (11) is 12 +- + :file: 'license/20_put_license.yml' + :description: 'Installing and getting license works' +- + :file: 'license/20_put_license.yml' + :description: 'Should install a feature type license' + +# error: "The [accept_enterprise] parameters may not be false" +- + :file: 'license/30_enterprise_license.yml' + :description: 'Installing enterprise license' + +# "estimated_heap_memory_usage_bytes" expected to be true, but field not present in response +- + :file: 'ml/inference_crud.yml' + :description: 'Test put model' + +# error: "no handler found for uri [/foo/doc/1] and method [PUT] +- + :file: 'roles/11_idx_arrays.yml' + :description: 'Test put role api using as array of index names' + +# error: "[date_histogram] unknown field [interval] did you mean [fixed_interval]?" +- + :file: 'rollup/rollup_search.yml' + :description: 'Search error no matching indices' + +# Issues with response type +- + :file: 'security/authz/14_cat_indices.yml' + :description: 'Test empty request while no-authorized index' +- + :file: 'security/authz/14_cat_indices.yml' + :description: 'Test empty request while single authorized index' +- + :file: 'security/authz/14_cat_indices.yml' + :description: 'Test explicit request while multiple authorized indices' +- + :file: 'security/authz/14_cat_indices.yml' + :description: 'Test explicit request while multiple opened/closed authorized indices' +- + :file: 'security/authz/14_cat_indices.yml' + :description: 'Test wildcard request with multiple authorized indices' + +# error: "Action/metadata line [1] contains an unknown parameter [_type]" +- + :file: 'sql/sql.yml' + :description: 'Execute some SQL' +- + :file: 'sql/sql.yml' + :description: 'Paging through results' +- + :file: 'sql/sql.yml' + :description: 'Clean cursor' +- + :file: 'sql/sql.yml' + :description: 'Getting textual representation' +- + :file: 'sql/translate.yml' + :description: 'Translate SQL' + +# error: request [/test-index] contains unrecognized parameter: [include_type_name] +- + :file: 'vectors/10_dense_vector_basic.yml' + :description: 'Dot Product' +- + :file: 'vectors/10_dense_vector_basic.yml' + :description: 'Cosine Similarity' +- + :file: 'vectors/20_dense_vector_special_cases.yml' + :description: "Indexing of Dense vectors should error when dims don't match defined in the mapping" +- + :file: 'vectors/20_dense_vector_special_cases.yml' + :description: 'Vectors of mixed integers and floats' +- + :file: 'vectors/20_dense_vector_special_cases.yml' + :description: 'Functions with query vectors with dims different from docs vectors should error' +- + :file: 'vectors/20_dense_vector_special_cases.yml' + :description: 'Dense vectors should error with sparse vector functions'