@@ -516,10 +516,13 @@ mod tests {
516516 }
517517
518518 assert_eq ! ( parsed_event_json[ "family" ] , json!( "native" ) ) ;
519- assert_eq ! (
520- parsed_event_json[ "internal" ] ,
521- json!( { "libdatadog_version" : env!( "CARGO_PKG_VERSION" ) } )
522- ) ;
519+
520+ let internal = parsed_event_json. get ( "internal" ) . unwrap ( ) ;
521+ assert ! ( internal. is_object( ) ) ;
522+
523+ let libdd_version = internal. get ( "libdatadog_version" ) ;
524+ assert ! ( libdd_version. is_some( ) ) ;
525+ assert ! ( libdd_version. unwrap( ) . is_string( ) ) ;
523526 assert_eq ! ( parsed_event_json[ "version" ] , json!( "4" ) ) ;
524527
525528 // TODO: Assert on contents of attachments, as well as on the headers/configuration for the
@@ -573,15 +576,13 @@ mod tests {
573576
574577 let parsed_event_json = parsed_event_json ( build_result) ;
575578
576- assert_eq ! (
577- parsed_event_json[ "internal" ] ,
578- json!( {
579- "no_signals_workaround_enabled" : "true" ,
580- "execution_trace_enabled" : "false" ,
581- "extra object" : { "key" : [ 1 , 2 , true ] } ,
582- "libdatadog_version" : env!( "CARGO_PKG_VERSION" ) ,
583- } )
584- ) ;
579+ let internal = parsed_event_json. get ( "internal" ) . unwrap ( ) ;
580+
581+ assert_eq ! ( internal[ "no_signals_workaround_enabled" ] , "true" ) ;
582+ assert_eq ! ( internal[ "execution_trace_enabled" ] , "false" ) ;
583+ assert_eq ! ( internal[ "extra object" ] , json!( { "key" : [ 1 , 2 , true ] } ) ) ;
584+ assert ! ( internal[ "libdatadog_version" ] . is_string( ) ) ;
585+ assert ! ( !internal[ "libdatadog_version" ] . as_str( ) . unwrap( ) . is_empty( ) ) ;
585586 }
586587
587588 #[ test]
0 commit comments