Skip to content

Commit 0e015df

Browse files
committed
test(coverage): tighten sentry_dsn round-trip assertion to exact value
round_trip_preserves_all_fields previously only checked `back.sentry_dsn.is_some()`, which would still pass if serde dropped or corrupted the DSN string. Compare the full decoded value instead so any regression in the Option<String> path is caught. Refs tinyhumansai#530.
1 parent 4f0dbd7 commit 0e015df

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/openhuman/config/schema/observability.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ mod tests {
9797
assert_eq!(back.backend, "otel");
9898
assert_eq!(back.otel_endpoint.as_deref(), Some("http://localhost:4318"));
9999
assert_eq!(back.otel_service_name.as_deref(), Some("openhuman-test"));
100-
assert!(back.sentry_dsn.is_some());
100+
assert_eq!(
101+
back.sentry_dsn.as_deref(),
102+
Some("https://token@sentry.io/1")
103+
);
101104
assert!(!back.analytics_enabled);
102105
}
103106
}

0 commit comments

Comments
 (0)