Skip to content

test: add final unit tests and update Testing Guide#48

Open
lwshang wants to merge 5 commits intomainfrom
lwshang/SDK-2698_test_p5
Open

test: add final unit tests and update Testing Guide#48
lwshang wants to merge 5 commits intomainfrom
lwshang/SDK-2698_test_p5

Conversation

@lwshang
Copy link
Copy Markdown
Collaborator

@lwshang lwshang commented May 8, 2026

Summary

  • Adds unit tests covering three areas previously planned as E2E tests: encoding policy, chunking/pagination, and authorization
  • Replaces the verbose Test Plan in TEST.md with a concise Testing Guide focused on what testers actually need

lwshang and others added 5 commits May 8, 2026 10:47
Adds `prepare_asset_skips_gzip_when_not_smaller` to `sync.rs` to directly
exercise the size-comparison branch in `prepare_asset`. The other two
scenarios (text→gzip, binary→identity-only) are already covered by the
`encoders_for` tests in `content.rs`, so no E2E tests are needed.
Updates TEST.md accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR finalizes previously planned E2E coverage by adding targeted unit tests in assets-sync (chunking boundaries, gzip “not smaller” behavior, authorization error propagation, and pagination behavior), and replaces the old verbose TEST.md “Test Plan” with a concise “Testing Guide” describing where each test layer lives and when to add new tests.

Changes:

  • Rewrote TEST.md into a shorter Testing Guide describing the three test components (canister, plugin, e2e) and when to extend each.
  • Added unit tests in assets-sync/src/sync.rs for chunk upload boundary cases, gzip skip behavior, proxy-mode commit permission granting, and permission error propagation from create_batch.
  • Added unit tests in assets-sync/src/canister.rs validating list_assets pagination termination behavior across empty, partial, and multi-page responses.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
TEST.md Replaces the prior detailed test plan with a concise guide to running and extending tests by component.
assets-sync/src/sync.rs Adds unit tests for chunking boundaries, gzip skip behavior, and authorization-related sync flows.
assets-sync/src/canister.rs Adds unit tests for list_assets pagination behavior across different page patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lwshang lwshang marked this pull request as ready for review May 8, 2026 16:02
@lwshang lwshang requested a review from a team as a code owner May 8, 2026 16:02
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.

2 participants