feat: simplify ClientTest/UpgradeTest for chain and cross-version integration testing#507
Merged
Merged
Conversation
…egration testing - Replace OSS/deprecated silent mode with a single mode-agnostic ClientTest entry point - Remove CLI argument branching (chain/cross-version); the SDK's DownloadPlanBuilder selects CVP vs chain automatically based on server response (IsCrossVersion + FromVersion) - Fix MSBuild CopyUpgradeTest target: stop excluding *.json so UpgradeTest.runtimeconfig.json is bundled as Update.exe, fixing 'hostpolicy.dll not found' launch error - Improve events logging (IsCrossVersion/AppType/FromVersion display in OnUpdateInfo) - Update UpgradeTest with clearer IPC flow documentation Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR streamlines the two-process integration test harness (Client → Upgrade) used to validate both chain-update and cross-version (CVP) flows against GeneralSpacestation, and fixes a build output copy issue that prevented Update.exe from starting correctly.
Changes:
- Simplified
ClientTestinto a single mode-agnostic entry point, relying onCore.DownloadPlanBuilderto choose chain vs CVP. - Simplified
UpgradeTestto always run the standard IPC-driven upgrade path, with clearer IPC/logging notes. - Fixed
ClientTest.csprojoutput-copy target to include required*.jsonfiles fromUpgradeTestoutput.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/UpgradeTest/Program.cs | Removes OSS-mode path and improves IPC/logging explanations for the standard upgrade flow. |
| tests/ClientTest/Program.cs | Consolidates test entry point and enhances update-info logging for chain/CVP visibility. |
| tests/ClientTest/ClientTest.csproj | Stops excluding *.json so Update.exe has required runtime/deps config files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // When no IPC file exists (first run, no update pending), the bootstrap | ||
| // treats it as a no-op and returns gracefully — no error, no crash. | ||
| Console.WriteLine("Reading IPC process contract (written by Client process)..."); | ||
| Console.WriteLine("IPC file: %TEMP%/GeneralUpdate/ipc/process_info.enc"); |
Comment on lines
+125
to
+129
| var mode = vi.IsCrossVersion == true ? "CVP" : "Chain"; | ||
| Console.WriteLine($" - [{mode}] {vi.Version} ({vi.Name}) [{vi.Size} bytes] " + | ||
| $"AppType={(vi.AppType == 1 ? "Client" : "Upgrade")} " + | ||
| $"{(vi.IsForcibly == true ? "(forced)" : "")}" + | ||
| $"{(!string.IsNullOrEmpty(vi.FromVersion) ? $" from={vi.FromVersion}" : "")}"); |
- Replace hard-coded '%TEMP%/...' IPC path with Path.GetTempPath() at runtime - Use OS-agnostic wording for strategy comments (WindowsStrategy → OS strategy) - Use switch expression for AppType display to handle null/unknown values
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.
关联 Issue
Closes #506
改动内容
如何验证
测试结果