Refactor: consolidate test helpers, parameterize tests, and fix WASM OOM bug#137
Refactor: consolidate test helpers, parameterize tests, and fix WASM OOM bug#137
Conversation
…tests into common module
…M on large images
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR adds test infrastructure improvements by introducing rstest-based parameterized testing, consolidating test utilities into a shared common module, refactoring integration tests to reduce duplication, fixing duplicate query parameter handling in auth parsing, and excluding large binary data from JSON serialization in WASM responses. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
tests/common/mod.rs:tiny_png(),send_signed_get(),status_code(), eliminating ~200 lines of duplication across S3/GCS/Azure integration testsrstest, replacing 4 nearly identical test functions with a single parameterized test.clone()inauth.rsparse_query_paramsby usingcontains_keybeforeinserttiny_png/large_png_bytesintests/common/mod.rs#[serde(skip_serializing)]toWasmTransformResponse.bytesto prevent serializing megabytes of image data as a JSON number array, which caused browser hangs when drag-and-dropping images on GitHub PagesTest plan
cargo fmt --all -- --checkpassescargo clippy --all-targets --all-features -- -D warningspassescargo testpassesSummary by CodeRabbit
Bug Fixes
Improvements
Tests