Skip to content

Test/comprehensive unit tests 13#394

Merged
JusterZhu merged 6 commits into
masterfrom
test/comprehensive-unit-tests-13
May 25, 2026
Merged

Test/comprehensive unit tests 13#394
JusterZhu merged 6 commits into
masterfrom
test/comprehensive-unit-tests-13

Conversation

@JusterZhu
Copy link
Copy Markdown
Collaborator

No description provided.

JusterZhu added 4 commits May 24, 2026 22:46
Add comprehensive unit tests covering:
- Client/Upgrade mutual upgrade integration (ProcessInfo IPC, version chain, forcibly update)
- Differential upgrade full cycle (Clean/Dirty, binary files, nested directories, mixed operations)
- Event notification pipeline (all 7 event types, push upgrade simulation, multiple listeners)
- Parameter matrix combinations (UpdateOptions, Configinfo validation, auth schemes, blacklists)
- Real-world developer usage scenarios (minimal setup, full production chain, fluent API)
- StorageManager backup/restore tests
- PipelineContext and DiffPipeline tests

Results: CoreTest 111/112 pass, DifferentialTest 23/23 pass, ClientCoreTest 115/115 pass
- Rebase on origin/master (merged project structure)
- Fix all namespace references to GeneralUpdate.Core.*
- Fix API changes: AppType enum, UpdateOptions, BlackListManager
- Fix copilot suggestions: encoding, tautology, mutations, unused vars
- Fix AddCustomOption empty list and Precheck callback tests

Results: CoreTest 165p, DifferentialTest 85p, ClientCoreTest 42p
… model tests

- BootstrapHooksAndExtensionsTests: Hook lifecycle (5 methods), RejectingHooks,
  UpdateContext/DownloadContext models, UpdateReport/UpdateEvent, IUpdateEventListener (8 methods), Security schemes
- BootstrapFullParameterMatrixTests: ALL 42 UpdateOptions constants with type coverage,
  6 combination chains (all 33 options, silent client, parallel diff, upgrade no backup, full security)
- ConfigurationModelsTests: BlackListConfig, HubConfig, DownloadAsset, DownloadPlan,
  DownloadProgress, DownloadResult, all 9 enum types, UpdateOption<T> value semantics

Results: CoreTest 283p/3f(pre-existing), all new tests pass
- Chain_ClientAndUpgrade_BothFullyConfigured: production deployment with
  Client and Upgrade bootstraps configured simultaneously with ALL
  non-conflicting parameters (30+ options each), hooks, listeners,
  extensions. Verifies independent instances.

- Chain_ClientAndUpgrade_CompleteDeveloperWorkflow: real-world developer
  flow showing complete API surface for both roles in a single method
Copilot AI review requested due to automatic review settings May 24, 2026 16:13
Copy link
Copy Markdown
Contributor

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

Adds a large set of “comprehensive” unit/integration tests across the differential update pipeline and Core bootstrap/configuration surface, aiming to validate common real-world usage scenarios (diff/patch, eventing, hooks, and option matrices).

Changes:

  • Adds end-to-end differential Clean/Dirty and DiffPipeline integration tests (including binary, nested directories, cancellation, and progress).
  • Adds broad configuration/model coverage for Core configuration types, enums, and UpdateOption semantics.
  • Adds extensive bootstrap scenario/matrix tests (options chaining, hooks/extensions, event notification flows, and client/upgrader configuration patterns).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/DifferentialTest/DifferentialUpgradeIntegrationTests.cs New integration tests for DifferentialCore + DiffPipeline across many filesystem scenarios and parameters.
tests/CoreTest/Configuration/ConfigurationModelsTests.cs New unit tests for configuration/download models, enums, and UpdateOption value semantics.
tests/CoreTest/Bootstrap/ParameterMatrixAndEventTests.cs New tests for EventManager dispatching, Configinfo validation matrix, blacklist manager, and storage/backup helpers.
tests/CoreTest/Bootstrap/ClientUpgradeIntegrationTests.cs New integration tests for bootstrap configuration chains, ProcessInfo JSON round-trips, and listener registration behavior.
tests/CoreTest/Bootstrap/BootstrapHooksAndExtensionsTests.cs New tests covering hooks lifecycle, no-op hooks, contexts, reporters, and event listener interfaces.
tests/CoreTest/Bootstrap/BootstrapFullParameterMatrixTests.cs New “full matrix” tests validating that many UpdateOptions can be set/chained without throwing.
tests/ClientCoreTest/Bootstrap/ClientBootstrapScenarioTests.cs New client-side scenario tests for bootstrap configuration patterns, precheck/skip logic, and listener chains.

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

Comment on lines +401 to +408

var versions = new List<string>();

EventManager.Instance.AddListener<UpdateInfoEventArgs>((sender, args) =>
{
if (args.Info?.Body != null)
versions.AddRange(args.Info.Body.Select(v => v.Version!));
});
Comment on lines +20 to +28
/// <summary>
/// Comprehensive differential upgrade integration tests.
/// Covers:
/// - Client ??Upgrade mesh update: generate patches in client context, apply in upgrade context
/// - All file operations: modified, added, deleted, unchanged, binary
/// - Complex directory structures
/// - Push upgrade simulation via differential pipeline
/// - Various parameter combinations (parallel, serial, cancellation, progress)
/// - Real-world developer usage scenarios
namespace CoreTest.Bootstrap
{
/// <summary>
/// Full parameter matrix tests �?verifies ALL UpdateOptions constants
};

// ==========================================
// CLIENT bootstrap �?full production config
Assert.NotNull(clientBootstrap);

// ==========================================
// UPGRADE bootstrap �?full production config
@JusterZhu JusterZhu merged commit e82612a into master May 25, 2026
3 checks passed
@JusterZhu JusterZhu deleted the test/comprehensive-unit-tests-13 branch May 25, 2026 02:36
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