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

Function test_decode_corrupted_payload

atomic-agent/src/envelope.rs:779–786  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

777
778 #[test]
779 fn test_decode_corrupted_payload() {
780 let mut bytes = Vec::new();
781 bytes.extend_from_slice(MAGIC);
782 bytes.push(SCHEMA_VERSION);
783 bytes.extend_from_slice(b"this is not valid postcard data at all");
784 let err = SessionEnvelope::decode(&bytes).unwrap_err();
785 assert!(matches!(err, AgentError::EnvelopeCodecError { .. }));
786 }
787
788 // is_session_envelope
789

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected