@@ -183,8 +183,6 @@ static void test_http_provider()
183
183
struct flb_aws_credentials * creds ;
184
184
int ret ;
185
185
struct flb_config * config ;
186
- flb_sds_t host ;
187
- flb_sds_t path ;
188
186
189
187
g_request_count = 0 ;
190
188
@@ -194,19 +192,6 @@ static void test_http_provider()
194
192
return ;
195
193
}
196
194
197
- host = flb_sds_create ("127.0.0.1" );
198
- if (!host ) {
199
- flb_errno ();
200
- flb_config_exit (config );
201
- return ;
202
- }
203
- path = flb_sds_create ("/happy-case" );
204
- if (!path ) {
205
- flb_errno ();
206
- flb_config_exit (config );
207
- return ;
208
- }
209
-
210
195
provider = flb_http_provider_create (config , generator_in_test ());
211
196
212
197
if (!provider ) {
@@ -261,8 +246,6 @@ static void test_http_provider_error_case()
261
246
struct flb_aws_credentials * creds ;
262
247
int ret ;
263
248
struct flb_config * config ;
264
- flb_sds_t host ;
265
- flb_sds_t path ;
266
249
267
250
g_request_count = 0 ;
268
251
@@ -272,21 +255,7 @@ static void test_http_provider_error_case()
272
255
return ;
273
256
}
274
257
275
- host = flb_sds_create ("127.0.0.1" );
276
- if (!host ) {
277
- flb_errno ();
278
- flb_config_exit (config );
279
- return ;
280
- }
281
- path = flb_sds_create ("/error-case" );
282
- if (!path ) {
283
- flb_errno ();
284
- flb_config_exit (config );
285
- return ;
286
- }
287
-
288
258
provider = flb_http_provider_create (config , generator_in_test ());
289
-
290
259
if (!provider ) {
291
260
flb_errno ();
292
261
flb_config_exit (config );
@@ -311,6 +280,7 @@ static void test_http_provider_error_case()
311
280
*/
312
281
TEST_CHECK (g_request_count == 3 );
313
282
283
+
314
284
flb_aws_provider_destroy (provider );
315
285
flb_config_exit (config );
316
286
}
@@ -321,8 +291,6 @@ static void test_http_provider_malformed_response()
321
291
struct flb_aws_credentials * creds ;
322
292
int ret ;
323
293
struct flb_config * config ;
324
- flb_sds_t host ;
325
- flb_sds_t path ;
326
294
327
295
g_request_count = 0 ;
328
296
@@ -334,19 +302,6 @@ static void test_http_provider_malformed_response()
334
302
335
303
mk_list_init (& config -> upstreams );
336
304
337
- host = flb_sds_create ("127.0.0.1" );
338
- if (!host ) {
339
- flb_errno ();
340
- flb_config_exit (config );
341
- return ;
342
- }
343
- path = flb_sds_create ("/malformed" );
344
- if (!path ) {
345
- flb_errno ();
346
- flb_config_exit (config );
347
- return ;
348
- }
349
-
350
305
provider = flb_http_provider_create (config , generator_in_test ());
351
306
352
307
if (!provider ) {
@@ -774,7 +729,6 @@ static void test_http_validator_invalid_host()
774
729
775
730
flb_aws_client_mock_destroy_generator ();
776
731
flb_free (config );
777
-
778
732
}
779
733
780
734
static void test_http_validator_invalid_port ()
@@ -789,6 +743,8 @@ static void test_http_validator_invalid_port()
789
743
790
744
config = flb_calloc (1 , sizeof (struct flb_config ));
791
745
TEST_ASSERT (config != NULL );
746
+ TEST_ASSERT (config != NULL );
747
+
792
748
mk_list_init (& config -> upstreams );
793
749
794
750
/* provider creation will fail with error message indicating port was invalid */
@@ -797,7 +753,6 @@ static void test_http_validator_invalid_port()
797
753
798
754
flb_aws_client_mock_destroy_generator ();
799
755
flb_free (config );
800
-
801
756
}
802
757
803
758
TEST_LIST = {
0 commit comments