()
| 762 | |
| 763 | #[test] |
| 764 | fn test_decode_unsupported_version() { |
| 765 | let mut bytes = make_minimal_envelope().encode().unwrap(); |
| 766 | // Bump version to something unsupported |
| 767 | bytes[4] = 99; |
| 768 | let err = SessionEnvelope::decode(&bytes).unwrap_err(); |
| 769 | match err { |
| 770 | AgentError::EnvelopeCodecError { reason } => { |
| 771 | assert!(reason.contains("unsupported schema version")); |
| 772 | assert!(reason.contains("99")); |
| 773 | } |
| 774 | other => panic!("Expected EnvelopeCodecError, got: {:?}", other), |
| 775 | } |
| 776 | } |
| 777 | |
| 778 | #[test] |
| 779 | fn test_decode_corrupted_payload() { |
nothing calls this directly
no test coverage detected