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)
5555 _method = chain [ -1 ]
5656 case _method
5757 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
5863 if ENV [ 'QUIET' ] == 'true'
5964 # todo: create a method on Elasticsearch::Client that can clone the client with new options
6065 Elasticsearch ::Client . new ( host : URL ,
61- transport_options : TRANSPORT_OPTIONS . merge ( headers : prepare_arguments ( args , test ) ) )
66+ transport_options : TRANSPORT_OPTIONS . merge ( headers : headers ) )
6267 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 ) )
6571 end
6672 when 'catch'
6773 client
Original file line number Diff line number Diff line change 5454 end
5555end
5656
57-
58-
5957YAML_FILES_DIRECTORY = "#{ File . expand_path ( File . dirname ( '..' ) , '..' ) } " +
6058 "/tmp/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test"
6159
You can’t perform that action at this time.
0 commit comments