()
| 105 | |
| 106 | #[test] |
| 107 | fn test_ssh_activity_builder() { |
| 108 | let ctx = test_sandbox_context(); |
| 109 | let event = SshActivityBuilder::new(&ctx) |
| 110 | .activity(ActivityId::Open) |
| 111 | .action(ActionId::Allowed) |
| 112 | .disposition(DispositionId::Allowed) |
| 113 | .severity(SeverityId::Informational) |
| 114 | .src_endpoint_addr("10.42.0.1".parse().unwrap(), 48201) |
| 115 | .auth_type(AuthTypeId::Other, "NSSH1") |
| 116 | .protocol_ver("NSSH1") |
| 117 | .message("SSH handshake accepted via NSSH1") |
| 118 | .build(); |
| 119 | |
| 120 | let json = event.to_json().unwrap(); |
| 121 | assert_eq!(json["class_uid"], 4007); |
| 122 | assert_eq!(json["auth_type"], "NSSH1"); |
| 123 | assert_eq!(json["auth_type_id"], 99); |
| 124 | } |
| 125 | } |
nothing calls this directly
no test coverage detected