Skip to content

Commit

Permalink
[XPACK] Adds skipped tests to compatibility suite
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Dec 9, 2021
1 parent 0b1f2c2 commit 91a0ea1
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 1 deletion.
7 changes: 6 additions & 1 deletion elasticsearch-xpack/spec/rest_yaml_tests_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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?
Expand All @@ -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
Expand Down
86 changes: 86 additions & 0 deletions elasticsearch-xpack/spec/skipped_tests_8.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 91a0ea1

Please sign in to comment.