fix(sync): 固化 release flow 状态码

This commit is contained in:
2026-07-31 15:57:07 +08:00
parent 99e6b3a23a
commit 4cc143f66d
12 changed files with 619 additions and 36 deletions
+16 -5
View File
@@ -558,11 +558,15 @@ func TestDiscoverCallsStatusBeforeDoctor(t *testing.T) {
b := uint64(info.Size())
_ = bytes
catalogObj := map[string]any{
"available": true,
"app_version": "1.70.0",
"bundle_version": "s8tloc7lo3",
"connection_group_name": "Prod",
"addressables_root": "https://prod-clientpatch.bluearchiveyostar.com/r93_fixture",
"available": true,
"status": "published",
"status_code": "official.published",
"distribution_status": "ready",
"distribution_status_code": "distribution.ready",
"app_version": "1.70.0",
"bundle_version": "s8tloc7lo3",
"connection_group_name": "Prod",
"addressables_root": "https://prod-clientpatch.bluearchiveyostar.com/r93_fixture",
"version": map[string]any{
"id": "v1",
"resource_root": root,
@@ -603,6 +607,13 @@ func TestDiscoverCallsStatusBeforeDoctor(t *testing.T) {
if result.DoctorHealthy == nil || !*result.DoctorHealthy {
t.Fatal("doctor healthy expected")
}
summary := result.Index.Summary()
if summary.Snapshot.Status != "published" || summary.Snapshot.StatusCode != "official.published" {
t.Fatalf("snapshot status=%q code=%q", summary.Snapshot.Status, summary.Snapshot.StatusCode)
}
if summary.Snapshot.DistributionStatusCode != "distribution.ready" {
t.Fatalf("distribution status code=%q", summary.Snapshot.DistributionStatusCode)
}
}
func TestLoadEnvFileDoesNotOverride(t *testing.T) {