17 lines
589 B
Rust
17 lines
589 B
Rust
#[test]
|
|
fn annotation_writer_produces_expected_grafana_payload() {
|
|
let a = api::build_grafana_deploy_annotation(api::DeployAnnotationArgs {
|
|
service: "gateway",
|
|
version: Some("1.2.3"),
|
|
git_sha: Some("abc123"),
|
|
time_ms: 1234567890,
|
|
});
|
|
|
|
assert_eq!(a.time, 1234567890);
|
|
assert!(a.tags.iter().any(|t| t == "deploy"));
|
|
assert!(a.tags.iter().any(|t| t == "service:gateway"));
|
|
assert!(a.tags.iter().any(|t| t == "version:1.2.3"));
|
|
assert!(a.tags.iter().any(|t| t == "git_sha:abc123"));
|
|
assert!(a.text.contains("deploy gateway"));
|
|
}
|