ci: update instructions handler test expectations
Some checks failed
CI / Canvas Deploy Reminder (push) Blocked by required conditions
publish-workspace-server-image / build-and-push (push) Waiting to run
publish-workspace-server-image / Production auto-deploy (push) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (push) Successful in 30s
CI / Detect changes (push) Successful in 1m7s
CI / Shellcheck (E2E scripts) (push) Successful in 40s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 1m4s
E2E API Smoke Test / detect-changes (push) Successful in 1m15s
Harness Replays / detect-changes (push) Successful in 22s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 23s
Handlers Postgres Integration / detect-changes (push) Successful in 1m42s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 1m0s
status-reaper / reap (push) Has started running
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 17s
Harness Replays / Harness Replays (push) Successful in 10s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 10s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m8s
CI / Python Lint & Test (push) Successful in 7m36s
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Successful in 5m12s
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 5m3s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 2m59s
CI / Canvas (Next.js) (push) Has been cancelled
CI / Platform (Go) (push) Has been cancelled
CI / all-required (push) Has been cancelled
Handlers Postgres Integration / Handlers Postgres Integration (push) Has been cancelled
gitea-merge-queue / queue (push) Successful in 22s

This commit is contained in:
hongming-codex-laptop 2026-05-14 16:25:55 -07:00
parent 8fced20267
commit 420ac2f00d

View File

@ -86,8 +86,11 @@ func TestInstructionsList_ByWorkspaceID(t *testing.T) {
if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil {
t.Fatalf("invalid JSON: %v", err)
}
if len(result) != 0 {
t.Fatalf("expected 0 instructions, got %d", len(result))
if len(result) != 2 {
t.Fatalf("expected 2 instructions, got %d", len(result))
}
if result[0].Scope != "global" || result[1].Scope != "workspace" {
t.Fatalf("expected global then workspace instructions, got %#v", result)
}
if err := mock.ExpectationsWereMet(); err != nil {
t.Fatalf("unmet expectations: %v", err)
@ -216,8 +219,8 @@ func TestInstructionsHandler_Create_Success(t *testing.T) {
if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil {
t.Fatalf("response not valid JSON: %v", err)
}
if out["id"] != "new-inst-1" {
t.Errorf("expected id new-inst-1, got %s", out["id"])
if out["id"] != "new-inst-id" {
t.Errorf("expected id new-inst-id, got %s", out["id"])
}
if err := mock.ExpectationsWereMet(); err != nil {
t.Errorf("unmet expectations: %v", err)