Test/comprehensive unit tests 13#394
Merged
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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 |
…s, CustomOptions, ClientCoreTest)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.