@@ -238,7 +238,10 @@ async fn full_payload_v1() {
238
238
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
239
239
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
240
240
assert ! ( event. metadata( ) . datadog_api_key( ) . is_none( ) ) ;
241
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
241
+ assert_eq ! (
242
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
243
+ "datadog_agent" . into( )
244
+ ) ;
242
245
assert_eq ! (
243
246
event. metadata( ) . schema_definition( ) ,
244
247
& test_logs_schema_definition( )
@@ -300,7 +303,10 @@ async fn full_payload_v2() {
300
303
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
301
304
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
302
305
assert ! ( event. metadata( ) . datadog_api_key( ) . is_none( ) ) ;
303
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
306
+ assert_eq ! (
307
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
308
+ "datadog_agent" . into( )
309
+ ) ;
304
310
assert_eq ! (
305
311
event. metadata( ) . schema_definition( ) ,
306
312
& test_logs_schema_definition( )
@@ -362,7 +368,10 @@ async fn no_api_key() {
362
368
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
363
369
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
364
370
assert ! ( event. metadata( ) . datadog_api_key( ) . is_none( ) ) ;
365
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
371
+ assert_eq ! (
372
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
373
+ "datadog_agent" . into( )
374
+ ) ;
366
375
assert_eq ! (
367
376
event. metadata( ) . schema_definition( ) ,
368
377
& test_logs_schema_definition( )
@@ -423,7 +432,10 @@ async fn api_key_in_url() {
423
432
assert_eq ! ( log[ "service" ] , "vector" . into( ) ) ;
424
433
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
425
434
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
426
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
435
+ assert_eq ! (
436
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
437
+ "datadog_agent" . into( )
438
+ ) ;
427
439
assert_eq ! (
428
440
& event. metadata( ) . datadog_api_key( ) . as_ref( ) . unwrap( ) [ ..] ,
429
441
"12345678abcdefgh12345678abcdefgh"
@@ -488,7 +500,10 @@ async fn api_key_in_query_params() {
488
500
assert_eq ! ( log[ "service" ] , "vector" . into( ) ) ;
489
501
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
490
502
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
491
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
503
+ assert_eq ! (
504
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
505
+ "datadog_agent" . into( )
506
+ ) ;
492
507
assert_eq ! (
493
508
& event. metadata( ) . datadog_api_key( ) . as_ref( ) . unwrap( ) [ ..] ,
494
509
"12345678abcdefgh12345678abcdefgh"
@@ -559,7 +574,10 @@ async fn api_key_in_header() {
559
574
assert_eq ! ( log[ "service" ] , "vector" . into( ) ) ;
560
575
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
561
576
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
562
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
577
+ assert_eq ! (
578
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
579
+ "datadog_agent" . into( )
580
+ ) ;
563
581
assert_eq ! (
564
582
& event. metadata( ) . datadog_api_key( ) . as_ref( ) . unwrap( ) [ ..] ,
565
583
"12345678abcdefgh12345678abcdefgh"
@@ -706,7 +724,10 @@ async fn ignores_api_key() {
706
724
assert_eq ! ( log[ "service" ] , "vector" . into( ) ) ;
707
725
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
708
726
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
709
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
727
+ assert_eq ! (
728
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
729
+ "datadog_agent" . into( )
730
+ ) ;
710
731
assert ! ( event. metadata( ) . datadog_api_key( ) . is_none( ) ) ;
711
732
assert_eq ! (
712
733
event. metadata( ) . schema_definition( ) ,
@@ -1398,7 +1419,10 @@ async fn split_outputs() {
1398
1419
assert_eq ! ( log[ "service" ] , "vector" . into( ) ) ;
1399
1420
assert_eq ! ( log[ "ddsource" ] , "curl" . into( ) ) ;
1400
1421
assert_eq ! ( log[ "ddtags" ] , "one,two,three" . into( ) ) ;
1401
- assert_eq ! ( log[ log_schema( ) . source_type_key( ) ] , "datadog_agent" . into( ) ) ;
1422
+ assert_eq ! (
1423
+ log[ log_schema( ) . source_type_key( ) . unwrap( ) . to_string( ) ] ,
1424
+ "datadog_agent" . into( )
1425
+ ) ;
1402
1426
assert_eq ! (
1403
1427
& event. metadata( ) . datadog_api_key( ) . as_ref( ) . unwrap( ) [ ..] ,
1404
1428
"12345678abcdefgh12345678abcdefgh"
0 commit comments