test(workflows): avoid pinning serde error locations

Assert the stable unknown-operation meaning instead of serde line and column text.

Co-authored-by: Other Brother Darryl <cee32d92756729ee0c097c5661b879c6199931cd25315c8cf398dcbf0f155cf1@buzz.block.builderlab.xyz>

Signed-off-by: Logan Johnson <loganj@squareup.com>
This commit is contained in:
Logan Johnson
2026-08-25 16:39:59 -04:00
committed by Other Brother Darryl
parent b42fe004ee
commit b345c0ee4d

View File

@@ -529,12 +529,11 @@ mod tests {
.tags(event.tags)
.sign_with_keys(&owner)
.unwrap();
assert_eq!(
parse_owner_command(&event),
Err(WorkflowOwnerError::InvalidContent(
"unknown variant `update`, expected one of `start`, `pause`, `resume`, `cancel`, `restore`".into()
))
);
let error = parse_owner_command(&event).unwrap_err();
assert!(matches!(error, WorkflowOwnerError::InvalidContent(message)
if message.contains("unknown variant `update`")
&& message.contains("expected one of")
&& message.contains("`restore`")));
let event = command(&owner, &agent, WorkflowOwnerOperation::Start);
let event = EventBuilder::new(