File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,6 @@ def execute(client, test = nil)
83
83
client
84
84
when 'headers'
85
85
headers = prepare_arguments ( args , test )
86
- # TODO: Remove Authorization headers while x_pack_rest_user is fixed
87
- if headers [ :Authorization ] == 'Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA=='
88
- headers . delete ( :Authorization )
89
- end
90
86
host = client . transport . instance_variable_get ( '@hosts' )
91
87
transport_options = client . transport . instance_variable_get ( '@options' ) &.dig ( :transport_options ) || { }
92
88
if ENV [ 'QUIET' ] == 'true'
Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ def self.run(client)
50
50
check_for_unexpectedly_recreated_objects ( client )
51
51
end
52
52
53
+ def self . create_xpack_rest_user ( client )
54
+ client . security . put_user (
55
+ username : 'x_pack_rest_user' ,
56
+ body : { password : 'x-pack-test-password' , roles : [ 'superuser' ] }
57
+ )
58
+ end
59
+
53
60
class << self
54
61
private
55
62
@@ -308,13 +315,6 @@ def delete_all_follow_patterns(client)
308
315
end
309
316
end
310
317
311
- def create_xpack_rest_user ( client )
312
- client . security . put_user (
313
- username : 'x_pack_rest_user' ,
314
- body : { password : 'x-pack-test-password' , roles : [ 'superuser' ] }
315
- )
316
- end
317
-
318
318
def clear_roles ( client )
319
319
client . security . get_role . each do |role , _ |
320
320
begin ; client . security . delete_role ( name : role ) ; rescue ; end
Original file line number Diff line number Diff line change 58
58
exit
59
59
end
60
60
61
+ Elasticsearch ::RestAPIYAMLTests ::WipeCluster . create_xpack_rest_user ( ADMIN_CLIENT ) if test_suite == 'platinum'
62
+
61
63
YAML_FILES_DIRECTORY = "#{ PROJECT_PATH } /../tmp/rest-api-spec/test/#{ test_suite } " . freeze
62
64
63
65
SINGLE_TEST = if ENV [ 'SINGLE_TEST' ] && !ENV [ 'SINGLE_TEST' ] . empty?
You can’t perform that action at this time.
0 commit comments