()
| 253 | |
| 254 | #[test] |
| 255 | fn webhook_payload_with_hmac() { |
| 256 | let config = SiemConfig { |
| 257 | webhook_hmac_secret: "test_secret".into(), |
| 258 | ..Default::default() |
| 259 | }; |
| 260 | let exporter = SiemExporter::new(config); |
| 261 | |
| 262 | let (body, signature) = exporter.build_webhook_payload(&[test_entry()]); |
| 263 | assert!(body.contains("nodedb")); |
| 264 | assert!(!signature.is_empty()); |
| 265 | assert_eq!(signature.len(), 64); // SHA-256 hex = 64 chars. |
| 266 | } |
| 267 | |
| 268 | #[test] |
| 269 | fn hmac_consistency() { |
nothing calls this directly
no test coverage detected