MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_decode_unsupported_version

Function test_decode_unsupported_version

atomic-core/src/change/envelope.rs:767–775  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

765
766 #[test]
767 fn test_decode_unsupported_version() {
768 let mut bytes = make_minimal_envelope().encode().unwrap();
769 // Bump version to something unsupported
770 bytes[4] = 99;
771 let err = SessionEnvelope::decode(&bytes).unwrap_err();
772 let SessionEnvelopeError { reason } = err;
773 assert!(reason.contains("unsupported schema version"));
774 assert!(reason.contains("99"));
775 }
776
777 #[test]
778 fn test_decode_corrupted_payload() {

Callers

nothing calls this directly

Calls 4

make_minimal_envelopeFunction · 0.85
decodeFunction · 0.50
unwrapMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected