File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
api-spec-testing/test_file Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,19 @@ def execute(client, test = nil)
55
55
_method = chain [ -1 ]
56
56
case _method
57
57
when 'headers'
58
+ headers = prepare_arguments ( args , test )
59
+ # TODO: Remove Authorization headers while x_pack_rest_user is fixed
60
+ if headers [ :Authorization ] == 'Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA=='
61
+ headers . delete ( :Authorization )
62
+ end
58
63
if ENV [ 'QUIET' ] == 'true'
59
64
# todo: create a method on Elasticsearch::Client that can clone the client with new options
60
65
Elasticsearch ::Client . new ( host : URL ,
61
- transport_options : TRANSPORT_OPTIONS . merge ( headers : prepare_arguments ( args , test ) ) )
66
+ transport_options : TRANSPORT_OPTIONS . merge ( headers : headers ) )
62
67
else
63
- Elasticsearch ::Client . new ( host : URL , tracer : Logger . new ( $stdout) ,
64
- transport_options : TRANSPORT_OPTIONS . merge ( headers : prepare_arguments ( args , test ) ) )
68
+ Elasticsearch ::Client . new ( host : URL ,
69
+ tracer : Logger . new ( $stdout) ,
70
+ transport_options : TRANSPORT_OPTIONS . merge ( headers : headers ) )
65
71
end
66
72
when 'catch'
67
73
client
Original file line number Diff line number Diff line change 54
54
end
55
55
end
56
56
57
-
58
-
59
57
YAML_FILES_DIRECTORY = "#{ File . expand_path ( File . dirname ( '..' ) , '..' ) } " +
60
58
"/tmp/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test"
61
59
You can’t perform that action at this time.
0 commit comments