Skip to content

Commit

Permalink
chore(ci): Fix event assertions for aws_ec2_metadata transform
Browse files Browse the repository at this point in the history
These were comparing metadata which broke after #17369
since the metadata (like cached estimated JSON size) were, expectedly, different.

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko committed May 16, 2023
1 parent 0518176 commit b970fac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/transforms/aws_ec2_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ mod integration_tests {
use std::collections::BTreeMap;
use vrl::value::Value;
use warp::Filter;
use vector_common::assert_event_data_eq;

fn ec2_metadata_address() -> String {
std::env::var("EC2_METADATA_ADDRESS").unwrap_or_else(|_| "http://localhost:1338".into())
Expand Down Expand Up @@ -855,7 +856,7 @@ mod integration_tests {

drop(tx);
topology.stop().await;
assert_eq!(out.recv().await, None);
assert_event_data_eq!(out.recv().await, None);
})
.await;
}
Expand Down Expand Up @@ -952,7 +953,7 @@ mod integration_tests {
tx.send(metric.into()).await.unwrap();

let event = out.recv().await.unwrap();
assert_eq!(event.into_metric(), expected_metric);
assert_event_data_eq!(event.into_metric(), expected_metric);

drop(tx);
topology.stop().await;
Expand Down Expand Up @@ -997,7 +998,7 @@ mod integration_tests {
tx.send(log.into()).await.unwrap();

let event = out.recv().await.unwrap();
assert_eq!(event.into_log(), expected_log);
assert_event_data_eq!(event.into_log(), expected_log);

drop(tx);
topology.stop().await;
Expand Down Expand Up @@ -1041,7 +1042,7 @@ mod integration_tests {
tx.send(metric.into()).await.unwrap();

let event = out.recv().await.unwrap();
assert_eq!(event.into_metric(), expected_metric);
assert_event_data_eq!(event.into_metric(), expected_metric);

drop(tx);
topology.stop().await;
Expand Down

0 comments on commit b970fac

Please sign in to comment.