test: cover wire protocol error roundtrips
This commit is contained in:
parent
2d314e85bf
commit
fe818fe0ab
2 changed files with 19 additions and 1 deletions
|
|
@ -3145,6 +3145,24 @@ mod tests {
|
||||||
request
|
request
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let response = PipeWireResponse::Error {
|
||||||
|
message: "pipe denied".to_owned(),
|
||||||
|
};
|
||||||
|
assert_eq!(
|
||||||
|
decode_pipe_wire_response(&encode_pipe_wire_response(&response).expect("encode"))
|
||||||
|
.expect("decode"),
|
||||||
|
response
|
||||||
|
);
|
||||||
|
|
||||||
|
let response = OverlayWireResponse::Error {
|
||||||
|
message: "overlay denied".to_owned(),
|
||||||
|
};
|
||||||
|
assert_eq!(
|
||||||
|
decode_overlay_wire_response(&encode_overlay_wire_response(&response).expect("encode"))
|
||||||
|
.expect("decode"),
|
||||||
|
response
|
||||||
|
);
|
||||||
|
|
||||||
let response = PeerControlResponse::SshProxyConnected {
|
let response = PeerControlResponse::SshProxyConnected {
|
||||||
node_id: "node:peer".to_owned(),
|
node_id: "node:peer".to_owned(),
|
||||||
agent_id: "agent:peer".to_owned(),
|
agent_id: "agent:peer".to_owned(),
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ and downstream projects.
|
||||||
- `[ ]` Every `ControlRequest` and `ControlResponse` variant roundtrips.
|
- `[ ]` Every `ControlRequest` and `ControlResponse` variant roundtrips.
|
||||||
- `[ ]` Every `PeerControlRequest` and `PeerControlResponse` variant
|
- `[ ]` Every `PeerControlRequest` and `PeerControlResponse` variant
|
||||||
roundtrips.
|
roundtrips.
|
||||||
- `[ ]` Pipe and overlay wire protocol variants roundtrip.
|
- `[x]` Pipe and overlay wire protocol variants roundtrip.
|
||||||
- `[x]` Unknown or malformed protocol inputs fail safely.
|
- `[x]` Unknown or malformed protocol inputs fail safely.
|
||||||
|
|
||||||
- `[x]` Classify command stability.
|
- `[x]` Classify command stability.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue