Compare commits

...

1 Commits

Author SHA1 Message Date
overtrue 66e895dc31 fix(test): compare legacy body wire parity as raw bytes
Lossy UTF-8 comparison concealed a changed binary response byte.
Compare the already captured Vec<u8> values directly.

Validation:
- Binary mutant: migrated payload 0x84 vs legacy 0x83; old comparator
  passed 1/1, raw comparator failed 0/1 (exit 100); restored green.
- Non-Swift body-drain mutant: untouched-body delegation test failed
  with empty vs payload (exit 100); restored handler without a diff.
- cargo nextest run --profile ci -p rustfs-s3-types -p rustfs-protocols
  --features rustfs-protocols/swift --no-fail-fast:
  543 tests run, 543 passed, 0 skipped after both mutants restored.
- cargo fmt --all --check and git diff --check passed.
2026-10-09 07:16:15 +08:00
+1 -5
View File
@@ -696,11 +696,7 @@ mod tests {
for (name, pair) in wire_pairs() {
let (ours, theirs) = pair();
let (ours, theirs) = (wire(ours, &method).await, wire(theirs, &method).await);
assert_eq!(
String::from_utf8_lossy(&ours),
String::from_utf8_lossy(&theirs),
"{method} {name}: the wire bytes changed"
);
assert_eq!(ours, theirs, "{method} {name}: the wire bytes changed");
}
}
}