Skip to content

test(dispatch): cover streaming_route path-style and virtual-hosted S3#789

Merged
vieiralucas merged 1 commit intomainfrom
worktree-stream-route-tests
Apr 26, 2026
Merged

test(dispatch): cover streaming_route path-style and virtual-hosted S3#789
vieiralucas merged 1 commit intomainfrom
worktree-stream-route-tests

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 26, 2026

Summary

Codecov flagged 0% patch coverage on the virtual-hosted branch added in #788. Adds 8 unit tests for streaming_route covering both the new code path and the surrounding logic.

Cases:

  • Path-style PutObject /bucket/key -> streaming
  • Path-style CreateBucket /bucket -> buffered (no slash after bucket)
  • Virtual-hosted PutObject /key (bucket in Host) -> streaming (the new branch)
  • Virtual-hosted root / -> buffered (CreateBucket on virtual-hosted endpoint)
  • ECR OCI v2 PATCH + PUT blob uploads -> streaming
  • Presigned V4 S3 PUT -> streaming
  • Non-S3 SigV4 auth header (lambda) -> buffered
  • GET method -> buffered

Test plan

  • cargo test -p fakecloud-core --lib streaming_route -> 8/8 pass
  • CI green
  • Cubic clean

Summary by cubic

Add 8 unit tests for streaming_route to cover S3 path-style and virtual-hosted PUTs, ECR blob uploads, and presigned S3 PUT. Verifies streaming only for PUT/PATCH uploads and skips CreateBucket, non-S3 SigV4, and GET, restoring coverage for the new virtual-hosted branch.

Written for commit 63b8122. Summary will update on new commits.

Codecov flagged 0% patch coverage on the virtual-hosted branch added in
PR #788. This adds 8 unit tests covering:

- Path-style PutObject `/bucket/key`
- Path-style CreateBucket `/bucket` (must skip streaming)
- Virtual-hosted PutObject `/key` with bucket in Host header
- Virtual-hosted root `/` (CreateBucket, must skip)
- ECR OCI v2 PATCH and PUT blob uploads
- Presigned V4 S3 PUT
- Non-S3 SigV4 auth header (must skip)
- GET method (must skip)
@vieiralucas vieiralucas merged commit bfa0601 into main Apr 26, 2026
14 of 15 checks passed
@vieiralucas vieiralucas deleted the worktree-stream-route-tests branch April 26, 2026 18:38
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant