fix(handlers): use valid UUIDs for workspace seeds in integration tests
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
Harness Replays / detect-changes (pull_request) Successful in 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
sop-checklist / all-items-acked (pull_request) [soft-fail tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: 2
qa-review / approved (pull_request) Failing after 10s
security-review / approved (pull_request) Failing after 11s
CI / Detect changes (pull_request) Successful in 16s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 15s
sop-checklist-gate / gate (pull_request) Successful in 10s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 18s
Harness Replays / Harness Replays (pull_request) Successful in 5s
gate-check-v3 / gate-check (pull_request) Successful in 15s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 17s
sop-tier-check / tier-check (pull_request) Successful in 9s
CI / Canvas (Next.js) (pull_request) Successful in 4s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
CI / Python Lint & Test (pull_request) Successful in 4s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m4s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 2m10s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 2m19s
CI / Platform (Go) (pull_request) Failing after 4m43s
CI / all-required (pull_request) Failing after 1s
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
Harness Replays / detect-changes (pull_request) Successful in 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
sop-checklist / all-items-acked (pull_request) [soft-fail tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: 2
qa-review / approved (pull_request) Failing after 10s
security-review / approved (pull_request) Failing after 11s
CI / Detect changes (pull_request) Successful in 16s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 15s
sop-checklist-gate / gate (pull_request) Successful in 10s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 18s
Harness Replays / Harness Replays (pull_request) Successful in 5s
gate-check-v3 / gate-check (pull_request) Successful in 15s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 17s
sop-tier-check / tier-check (pull_request) Successful in 9s
CI / Canvas (Next.js) (pull_request) Successful in 4s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
CI / Python Lint & Test (pull_request) Successful in 4s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m4s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 2m10s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 2m19s
CI / Platform (Go) (pull_request) Failing after 4m43s
CI / all-required (pull_request) Failing after 1s
workspaces.id is UUID-typed. The string IDs like "ws-source-159-integration" caused: pq: invalid input syntax for type uuid Fix: use real UUIDs (AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA / BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB) matching the pattern in delegation_ledger_integration_test.go. Also add the required 'name' column (NOT NULL) to the INSERT. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
7ae80d3ed4
commit
c831199562
@ -43,8 +43,8 @@ import (
|
||||
// Each test gets a fresh table state.
|
||||
|
||||
const testDelegationID = "del-159-test-integration"
|
||||
const testSourceID = "ws-source-159-integration"
|
||||
const testTargetID = "ws-target-159-integration"
|
||||
const testSourceID = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
|
||||
const testTargetID = "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
|
||||
|
||||
// setupIntegrationFixtures inserts the rows executeDelegation requires:
|
||||
// - workspaces: source and target (siblings, parent_id=NULL so CanCommunicate=true)
|
||||
@ -58,14 +58,15 @@ func setupIntegrationFixtures(t *testing.T, conn *sql.DB) func() {
|
||||
// We INSERT ... ON CONFLICT DO NOTHING so parallel test runs don't conflict.
|
||||
for _, ws := range []struct {
|
||||
id string
|
||||
name string
|
||||
parentID *string // nil means NULL
|
||||
}{
|
||||
{testSourceID, nil},
|
||||
{testTargetID, nil},
|
||||
{testSourceID, "test-source", nil},
|
||||
{testTargetID, "test-target", nil},
|
||||
} {
|
||||
if _, err := conn.ExecContext(context.Background(),
|
||||
`INSERT INTO workspaces (id, parent_id) VALUES ($1, $2) ON CONFLICT (id) DO NOTHING`,
|
||||
ws.id, ws.parentID,
|
||||
`INSERT INTO workspaces (id, name, parent_id) VALUES ($1::uuid, $2, $3) ON CONFLICT (id) DO NOTHING`,
|
||||
ws.id, ws.name, ws.parentID,
|
||||
); err != nil {
|
||||
t.Fatalf("seed workspace %s: %v", ws.id, err)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user