From 2d38cfb9ef5043e0c7be8bb416a48eb2b14ffead Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 17 Jul 2026 00:27:56 +0100 Subject: [PATCH] Stabilize legacy license exchange test --- docs/release-control/v6/internal/status.json | 14 +++++++------- .../api/licensing_handlers_auto_migrate_test.go | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json index d99f7a9ac..15ba032a2 100644 --- a/docs/release-control/v6/internal/status.json +++ b/docs/release-control/v6/internal/status.json @@ -8872,16 +8872,16 @@ ], "work_claims": [ { - "id": "codex-lane-l1", - "agent_id": "codex", - "summary": "Prepare and publish the governed v6.1.0-rc.2 release packet", + "id": "release-manager-lane-l3", + "agent_id": "release-manager", + "summary": "Stabilize the v6.1.0-rc.2 legacy license exchange release gate", "target_id": "v6-product-lane-expansion", - "claimed_at": "2026-07-16T22:37:38Z", - "heartbeat_at": "2026-07-16T22:37:38Z", - "expires_at": "2026-07-17T02:37:38Z", + "claimed_at": "2026-07-16T23:27:45Z", + "heartbeat_at": "2026-07-16T23:27:45Z", + "expires_at": "2026-07-17T03:27:45Z", "work_item": { "kind": "lane", - "id": "L1" + "id": "L3" } } ], diff --git a/internal/api/licensing_handlers_auto_migrate_test.go b/internal/api/licensing_handlers_auto_migrate_test.go index 799c0baef..8364f70b9 100644 --- a/internal/api/licensing_handlers_auto_migrate_test.go +++ b/internal/api/licensing_handlers_auto_migrate_test.go @@ -64,17 +64,28 @@ func TestGetTenantComponents_AutoExchangesPersistedLegacyJWT(t *testing.T) { var exchangeCalled atomic.Int32 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if handleTestInstallationStatus(w, r, 1) { + return + } if r.URL.Path != "/v1/licenses/exchange" { - t.Fatalf("path = %q, want /v1/licenses/exchange", r.URL.Path) + http.NotFound(w, r) + return + } + if r.Method != http.MethodPost { + t.Errorf("exchange method = %q, want POST", r.Method) + w.WriteHeader(http.StatusMethodNotAllowed) + return } exchangeCalled.Add(1) var req pkglicensing.ExchangeLegacyLicenseRequest if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - t.Fatalf("decode exchange request: %v", err) + t.Errorf("decode exchange request: %v", err) + w.WriteHeader(http.StatusBadRequest) + return } if req.LegacyLicenseKey == "" { - t.Fatal("expected legacy license key in exchange request") + t.Error("expected legacy license key in exchange request") } w.WriteHeader(http.StatusCreated)