(join: integration_pb::JoinEvent)
| 157 | } |
| 158 | |
| 159 | pub fn join_event(join: integration_pb::JoinEvent) -> Validator { |
| 160 | Box::new(move || { |
| 161 | let join = join.clone(); |
| 162 | Box::pin(async move { |
| 163 | // Integration events are handled async. |
| 164 | sleep(Duration::from_millis(100)).await; |
| 165 | |
| 166 | let mut event = mock::get_join_event().await.unwrap(); |
| 167 | |
| 168 | assert_ne!("", event.deduplication_id); |
| 169 | assert_ne!(None, event.time); |
| 170 | |
| 171 | event.deduplication_id = "".into(); |
| 172 | event.time = None; |
| 173 | assert_eq!(join, event); |
| 174 | }) |
| 175 | }) |
| 176 | } |
| 177 | |
| 178 | pub fn uplink_event(up: integration_pb::UplinkEvent) -> Validator { |
| 179 | Box::new(move || { |
no test coverage detected