From 0b1f2c2cef306b239ae70225952410779092faee Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 7 Dec 2021 15:13:08 +0000 Subject: [PATCH] [CI] Use text/plain for xpack tests --- elasticsearch-xpack/spec/rest_yaml_tests_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb b/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb index 627d5c5b0f..83bf97d84f 100644 --- a/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb +++ b/elasticsearch-xpack/spec/rest_yaml_tests_helper.rb @@ -23,7 +23,11 @@ PROJECT_PATH = File.join(File.dirname(__FILE__), '..', '..') -TRANSPORT_OPTIONS = {} +TRANSPORT_OPTIONS = if [true, 'true', 1].include? ENV['ELASTIC_CLIENT_APIVERSIONING'] + { headers: { 'Accept' => 'application/vnd.elasticsearch+json; compatible-with=7,text/plain' } } + else + {} + end TEST_SUITE = ENV['TEST_SUITE'].freeze || 'platinum' STACK_VERSION = ENV['STACK_VERSION']