diff --git a/packages/api/test/editor-contracts.test.ts b/packages/api/test/editor-contracts.test.ts index 8083fa6..523e995 100644 --- a/packages/api/test/editor-contracts.test.ts +++ b/packages/api/test/editor-contracts.test.ts @@ -16,7 +16,7 @@ describe("public editor contracts", () => { }); it("publishes concrete create and editor resource schemas in the executable contract", () => { const document = generateOpenApi() as any; - for (const path of ["/api/v1/execution-integrations", "/api/v1/job-trigger-availability", "/api/v1/providers/linear/projects", "/api/v1/providers/linear/options", "/api/v1/providers/clickup/lists", "/api/v1/providers/clickup/options", "/api/v1/providers/github/installations", "/api/v1/integrations/cloudflare-tail"]) { + for (const path of ["/api/v1/job-trigger-availability", "/api/v1/providers/linear/projects", "/api/v1/providers/linear/options", "/api/v1/providers/clickup/lists", "/api/v1/providers/clickup/options", "/api/v1/providers/github/installations", "/api/v1/integrations/cloudflare-tail"]) { const schema = document.paths[path].get.responses[200].content["application/json"].schema; expect(schema.type === "array" ? schema.items.required.length : schema.required.length).toBeGreaterThan(0); } diff --git a/packages/api/test/loading.postgres.test.ts b/packages/api/test/loading.postgres.test.ts index 7038ebe..5acbc80 100644 --- a/packages/api/test/loading.postgres.test.ts +++ b/packages/api/test/loading.postgres.test.ts @@ -78,15 +78,13 @@ describe.skipIf(!url)("request loading with PostgreSQL", () => { }); it("creates a job with a deterministic migrated execution integration UUID", async () => { - const target = (await db.pool.query(`INSERT INTO app.execution_configs(tenant_id,id,name,integration_kind,integration_id,agent_kind) - VALUES ($1::uuid,md5($1::text || ':target:local')::uuid,'Migrated local target','exe','local','codex') RETURNING id`, [tenantId])).rows[0].id; + const target = "local"; try { const job = await new ApiService(env, auth).createJob({ name: "Migrated target job", slug: "migrated-target-job", promptTemplate: "Do work", executionConfigId: target, concurrencyLimit: 1, triggers: [{ kind: "manual", enabled: true, config: {} }] }); expect(job.executionConfigId).toBe(target); expect(job.executionConfig).toMatchObject({ connectionId: "local", agentKind: "codex" }); } finally { await db.pool.query("DELETE FROM app.jobs WHERE execution_config->>'targetId'=$1", [target]); - await db.pool.query("DELETE FROM app.execution_configs WHERE id=$1", [target]); } }); it("enforces tenant and scope boundaries, email verification, cookie expiry and session revocation", async () => {