mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 19:50:38 +09:00
Fix signoff PR follow-up tests
This commit is contained in:
parent
bce58d353d
commit
cb705c9856
2 changed files with 13 additions and 4 deletions
|
|
@ -222,7 +222,7 @@ describe("heartbeat comment wake batching", () => {
|
||||||
db = createDb(started.connectionString);
|
db = createDb(started.connectionString);
|
||||||
instance = started.instance;
|
instance = started.instance;
|
||||||
dataDir = started.dataDir;
|
dataDir = started.dataDir;
|
||||||
}, 20_000);
|
}, 45_000);
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await instance?.stop();
|
await instance?.stop();
|
||||||
|
|
@ -406,7 +406,7 @@ describe("heartbeat comment wake batching", () => {
|
||||||
await waitFor(async () => {
|
await waitFor(async () => {
|
||||||
const runs = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.agentId, agentId));
|
const runs = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.agentId, agentId));
|
||||||
return runs.length === 2 && runs.every((run) => run.status === "succeeded");
|
return runs.length === 2 && runs.every((run) => run.status === "succeeded");
|
||||||
});
|
}, 30_000);
|
||||||
|
|
||||||
const secondPayload = gateway.getAgentPayloads()[1] ?? {};
|
const secondPayload = gateway.getAgentPayloads()[1] ?? {};
|
||||||
expect(secondPayload.paperclip).toMatchObject({
|
expect(secondPayload.paperclip).toMatchObject({
|
||||||
|
|
@ -422,7 +422,7 @@ describe("heartbeat comment wake batching", () => {
|
||||||
gateway.releaseFirstWait();
|
gateway.releaseFirstWait();
|
||||||
await gateway.close();
|
await gateway.close();
|
||||||
}
|
}
|
||||||
}, 20_000);
|
}, 45_000);
|
||||||
|
|
||||||
it("queues exactly one follow-up run when an issue-bound run exits without a comment", async () => {
|
it("queues exactly one follow-up run when an issue-bound run exits without a comment", async () => {
|
||||||
const gateway = await createControlledGatewayServer();
|
const gateway = await createControlledGatewayServer();
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,16 @@ async function setupCompany(boardRequest: APIRequestContext): Promise<TestContex
|
||||||
// Helper: create agent + API key + request context
|
// Helper: create agent + API key + request context
|
||||||
async function createAgent(name: string, role: string, title: string): Promise<AgentAuth> {
|
async function createAgent(name: string, role: string, title: string): Promise<AgentAuth> {
|
||||||
const agentRes = await boardRequest.post(`${BASE_URL}/api/companies/${companyId}/agents`, {
|
const agentRes = await boardRequest.post(`${BASE_URL}/api/companies/${companyId}/agents`, {
|
||||||
data: { name, role, title, adapterType: "process", adapterConfig: { command: "echo done" } },
|
data: {
|
||||||
|
name,
|
||||||
|
role,
|
||||||
|
title,
|
||||||
|
adapterType: "process",
|
||||||
|
adapterConfig: {
|
||||||
|
command: process.execPath,
|
||||||
|
args: ["-e", "process.stdout.write('done\\n')"],
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
expect(agentRes.ok()).toBe(true);
|
expect(agentRes.ok()).toBe(true);
|
||||||
const agent = await agentRes.json();
|
const agent = await agentRes.json();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue