(up: integration_pb::UplinkEvent)
| 176 | } |
| 177 | |
| 178 | pub fn uplink_event(up: integration_pb::UplinkEvent) -> Validator { |
| 179 | Box::new(move || { |
| 180 | let up = up.clone(); |
| 181 | Box::pin(async move { |
| 182 | // Integration events are handled async. |
| 183 | sleep(Duration::from_millis(100)).await; |
| 184 | |
| 185 | let mut event = mock::get_uplink_event().await.unwrap(); |
| 186 | |
| 187 | assert_ne!("", event.deduplication_id); |
| 188 | assert_ne!(None, event.time); |
| 189 | |
| 190 | event.deduplication_id = "".into(); |
| 191 | event.time = None; |
| 192 | assert_eq!(up, event); |
| 193 | }) |
| 194 | }) |
| 195 | } |
| 196 | |
| 197 | pub fn ack_event(ack: integration_pb::AckEvent) -> Validator { |
| 198 | Box::new(move || { |
no test coverage detected