Skip to content

Integration test harness: ClientTest + UpgradeTest for chain and cross-version update flow #506

Description

@JusterZhu

背景

Close integration test coverage for the two-process (Client → Upgrade) update flow against GeneralSpacestation. The test harness exercises both chain package updates and cross-version package updates through the same mode-agnostic client entry point.

改动内容

ClientTest (tests/ClientTest/Program.cs)

  • 去掉 OSS 模式和 silent 模式的注释代码,精简为单一的 RunUpdateTestAsync() 入口
  • 不再需要 --chain / --cross-version 参数 —— GeneralUpdate.Core.DownloadPlanBuilder 根据服务端返回的 IsCrossVersion + FromVersion 自动决策
  • 改进 OnUpdateInfo 日志输出,显示每个包的 [CVP] / [Chain] 标记、AppType、FromVersion

UpgradeTest (tests/UpgradeTest/Program.cs)

  • 优化日志输出,增加 IPC 文件路径提示

ClientTest.csproj

  • 修复 MSBuild CopyUpgradeTest target:之前 Exclude="*.json" 导致 UpgradeTest.runtimeconfig.json 没有被复制到 ClientTest 输出目录,启动 Update.exe 时报错 hostpolicy.dll not found

测试验证

链式更新(CrossVersionUpgrade.IsEnabled=false)

服务端返回链式包 → DownloadPlanBuilder 选择全部链式包 → Client 进程应用 Upgrade 包 → IPC → Upgrade 进程应用 Client 包 → manifest 版本更新

跨版本更新(CrossVersionUpgrade.IsEnabled=true)

服务端返回 CVP + 链式包 → DownloadPlanBuilder 优先选择 CVP(当 FromVersion 匹配本地版本)→ 一跳到位

Metadata

Metadata

Assignees

No one assigned

    Labels

    featuresNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions