Skip to content

Commit cd7dfdd

Browse files
committed
Fixed t tests
1 parent a580991 commit cd7dfdd

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

lib/Search/Elasticsearch/Role/Cxn.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ sub BUILDARGS {
165165

166166
# Elastic cloud API key
167167
if (defined $params->{elastic_cloud_api_key}) {
168-
$default_headers{'Authorization'} = sprintf("ApiKey %s", $params->{elastic_cloud_api_key});
168+
$default_headers{'Authorization'} = sprintf("ApiKey %s", $params->{elastic_cloud_api_key});
169169
}
170170

171171
# Elasticsearch token API (https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html)
172172
if (defined $params->{token_api}) {
173-
$default_headers{'Authorization'} = sprintf("Bearer %s", $params->{token_api});
173+
$default_headers{'Authorization'} = sprintf("Bearer %s", $params->{token_api});
174174
}
175175

176-
# Elasticsearch
176+
# Elasticsearch
177177
$params->{scheme} = $scheme;
178178
$params->{is_https} = $scheme eq 'https';
179179
$params->{host} = $host;

t/60_Cxn/30_http.t

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ is_cxn "Userinfo", new_cxn( nodes => "http://$userinfo\@localhost/" ),
5959
{
6060
port => '80',
6161
uri => 'http://localhost:80',
62-
default_headers => {
63-
'Authorization' => "Basic $userinfo_b64",
62+
default_headers => {
63+
'Authorization' => "Basic $userinfo_b64",
6464
'User-Agent' => $useragent,
6565
'x-elastic-client-meta' => $metaheader
6666
},
@@ -150,8 +150,8 @@ is_cxn "Userinfo option", new_cxn( nodes => 'foo', userinfo => $userinfo ),
150150
host => 'foo',
151151
port => 80,
152152
uri => 'http://foo:80',
153-
default_headers => {
154-
'Authorization' => "Basic $userinfo_b64",
153+
default_headers => {
154+
'Authorization' => "Basic $userinfo_b64",
155155
'User-Agent' => $useragent,
156156
'x-elastic-client-meta' => $metaheader
157157
},
@@ -167,8 +167,8 @@ is_cxn "Userinfo option with settings",
167167
host => 'foo',
168168
port => 80,
169169
uri => 'http://foo:80',
170-
default_headers => {
171-
'Authorization' => "Basic $userinfo_b64",
170+
default_headers => {
171+
'Authorization' => "Basic $userinfo_b64",
172172
'User-Agent' => $useragent,
173173
'x-elastic-client-meta' => $metaheader
174174
},
@@ -245,8 +245,8 @@ sub is_cxn (@) {
245245
port => '9200',
246246
scheme => 'http',
247247
uri => 'http://localhost:9200',
248-
default_headers => {
249-
'User-Agent' => $useragent,
248+
default_headers => {
249+
'User-Agent' => $useragent,
250250
'x-elastic-client-meta' => $metaheader
251251
},
252252
userinfo => '',

t/60_Cxn_Async/30_http.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ sub is_cxn (@) {
168168
port => '9200',
169169
scheme => 'http',
170170
uri => 'http://localhost:9200',
171-
default_headers => {
171+
default_headers => {
172172
'User-Agent' => $useragent,
173173
'x-elastic-client-meta' => $metaheader
174174
},

t/lib/MockAsyncCxn.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ sub perform_request {
121121
$response->{code}, # code
122122
$response->{error}, # msg
123123
$response->{content}, # body
124-
{
124+
{
125125
'content-type' => 'application/json',
126126
$PRODUCT_CHECK_HEADER => $PRODUCT_CHECK_VALUE
127127
}

t/lib/MockCxn.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ sub perform_request {
113113
$response->{code}, # code
114114
$response->{error}, # msg
115115
$response->{content}, # body
116-
{
117-
'content-type' => 'application/json',
116+
{
117+
'content-type' => 'application/json',
118118
$PRODUCT_CHECK_HEADER => $PRODUCT_CHECK_VALUE
119119
}
120120
);

0 commit comments

Comments
 (0)