Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/api/test/editor-contracts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 1 addition & 3 deletions packages/api/test/loading.postgres.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
Loading