Skip to content

Commit cca3498

Browse files
committed
[Client] Compatibility header: use text/plain
1 parent 3ba1ab1 commit cca3498

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

api-spec-testing/wipe_cluster_8.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def wipe_rollup_jobs(client)
134134
def wait_for_pending_rollup_tasks(client)
135135
filter = 'xpack/rollup/job'
136136
loop do
137-
results = client.cat.tasks(detailed: true)
137+
results = client.cat.tasks(detailed: true).split("\n")
138138
count = 0
139139

140140
time = Time.now.to_i

elasticsearch-transport/lib/elasticsearch/transport/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def set_compatibility_header
211211

212212
add_header(
213213
{
214-
'Accept' => 'application/vnd.elasticsearch+json;compatible-with=7',
214+
'Accept' => 'application/vnd.elasticsearch+json; compatible-with=7',
215215
'Content-Type' => 'application/vnd.elasticsearch+json; compatible-with=7'
216216
}
217217
)

elasticsearch-transport/spec/elasticsearch/transport/client_spec.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,10 +1432,7 @@
14321432
headers = client.transport.connections.first.connection.headers
14331433

14341434
expect(headers['Content-Type']).to eq('application/vnd.elasticsearch+json; compatible-with=7')
1435-
expect(headers['Accept']).to eq('application/vnd.elasticsearch+json;compatible-with=7')
1436-
1437-
response = client.perform_request('GET', '/')
1438-
expect(response.headers['content-type']).to eq('application/json; charset=UTF-8')
1435+
expect(headers['Accept']).to eq('application/vnd.elasticsearch+json; compatible-with=7')
14391436

14401437
ENV.delete('ELASTIC_CLIENT_APIVERSIONING')
14411438
end

elasticsearch-xpack/spec/xpack/rest_api_yaml_spec.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@
6565
ADMIN_CLIENT.xpack.watcher.delete_watch(id: 'my_watch')
6666
rescue Elasticsearch::Transport::Transport::Errors::NotFound
6767
end
68-
# todo: remove these two lines when Dimitris' PR is merged
69-
ADMIN_CLIENT.cluster.put_settings(body: { transient: { 'xpack.ml.max_model_memory_limit' => nil } })
70-
ADMIN_CLIENT.cluster.put_settings(body: { persistent: { 'xpack.ml.max_model_memory_limit' => nil } })
7168
test_file.setup
7269
end
7370

0 commit comments

Comments
 (0)