Skip to content

test: Comprehensive unit tests for Sub Issue 13 (Client/Upgrade/Differential/Push/Parameter matrix) #390

Description

@JusterZhu

Summary

This issue tracks the implementation of Sub Issue 13 from the GeneralUpdate Refactoring Plan v2: Comprehensive Unit Test Coverage.

Scope

Add thorough unit and integration tests covering the following areas:

1. Client ↔ Upgrade Mutual Upgrade Integration

  • Client validates versions for both client and upgrade
  • ProcessInfo serialization round-trip for IPC
  • VersionInfo with all fields (cross-version, forcibly, freeze)
  • Version chain sorting by release date
  • ConfigurationMapper: Configinfo → GlobalConfigInfo → ProcessInfo mapping

2. Differential Upgrade (Clean → Dirty Full Cycle)

  • Full mesh update: generate patches in client context, apply in upgrade context
  • Binary file differential (EXE/DLL/image assets)
  • Large binary files (100KB+)
  • Deeply nested directory structures
  • Mixed operations: modified, added, deleted, unchanged simultaneously
  • DiffPipeline with parallel/serial/cancellation/progress

3. Event Notification Pipeline (Push Upgrade)

  • All 7 event types registration and dispatch
  • Push upgrade simulation (server notifies, client receives)
  • Multiple listeners for the same event type
  • Listener exception isolation
  • Forcibly update notification

4. Parameter Matrix Combinations

  • UpdateOptions constants accessibility
  • Configinfo validation with various auth schemes (Bearer, ApiKey, Basic, HMAC)
  • Configinfo with various version formats
  • Configinfo with various update URLs
  • Full production configuration with all fields
  • BlackList configuration variations

5. Real-world Developer Usage Scenarios

  • Minimal setup (only required fields)
  • Full production setup with all options
  • Method chaining (fluent API)
  • Precheck/skip callbacks
  • Custom option injection
  • Silent update configuration

6. StorageManager / Backup Tests

  • GetTempDirectory creation
  • Backup file copying
  • Skip directory filtering

Acceptance Criteria

  • All new tests compile and pass on Windows
  • Test results: CoreTest 111/112 pass (1 pre-existing failure), DifferentialTest 23/23 pass, ClientCoreTest 115/115 pass
  • Tests cover client/upgrade/differential/push/parameter combination scenarios
  • Tests written from developer user's actual usage perspective

Related PRs

This is the final Sub Issue (#13) in the refactoring plan. Previous issues:

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions