Skip to content
Prev Previous commit
Next Next commit
Merge branch 'main' into args-tests
  • Loading branch information
blva authored Oct 8, 2025
commit 32aaee5429aedc2ebcd97e3ba5b4667cf9319b78
4 changes: 0 additions & 4 deletions tests/integration/tools/atlas/clusters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
import type { ClusterDescription20240805 } from "../../../../src/common/atlas/openapi.js";
import { afterAll, beforeAll, describe, expect, it } from "vitest";

function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}

async function deleteCluster(
session: Session,
projectId: string,
Expand Down Expand Up @@ -45,7 +41,7 @@
},
},
});
await sleep(1000);

Check failure on line 44 in tests/integration/tools/atlas/clusters.test.ts

View workflow job for this annotation

GitHub Actions / check-style

Cannot find name 'sleep'.
} catch {
break;
}
Expand All @@ -70,7 +66,7 @@
if (await check(cluster)) {
return;
}
await sleep(1000);

Check failure on line 69 in tests/integration/tools/atlas/clusters.test.ts

View workflow job for this annotation

GitHub Actions / check-style

Cannot find name 'sleep'.
}
}

Expand Down Expand Up @@ -108,7 +104,7 @@
expect(createFreeCluster.inputSchema.type).toBe("object");
expectDefined(createFreeCluster.inputSchema.properties);
expect(createFreeCluster.inputSchema.properties).toHaveProperty("projectId");
expect(createFreeCluster.inputSchema.properties).toHaveProperty("name");

Check failure on line 107 in tests/integration/tools/atlas/clusters.test.ts

View workflow job for this annotation

GitHub Actions / Run Atlas tests

tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-create-free-cluster > should have correct metadata

AssertionError: expected { projectId: { …(5) }, …(2) } to have property "name" ❯ tests/integration/tools/atlas/clusters.test.ts:107:66
expect(createFreeCluster.inputSchema.properties).toHaveProperty("region");
});

Expand Down Expand Up @@ -157,7 +153,7 @@
arguments: { projectId, clusterName: clusterName },
});
const elements = getResponseElements(response.content);
expect(elements).toHaveLength(2);

Check failure on line 156 in tests/integration/tools/atlas/clusters.test.ts

View workflow job for this annotation

GitHub Actions / Run Atlas tests

tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-inspect-cluster > returns cluster data

AssertionError: expected [ { type: 'text', …(1) } ] to have a length of 2 but got 1 - Expected + Received - 2 + 1 ❯ tests/integration/tools/atlas/clusters.test.ts:156:34
expect(elements[0]?.text).toContain("Cluster details:");
expect(elements[1]?.text).toContain("<untrusted-user-data-");
expect(elements[1]?.text).toContain(`${clusterName} | `);
Expand All @@ -182,7 +178,7 @@
.callTool({ name: "atlas-list-clusters", arguments: { projectId } });

const elements = getResponseElements(response);
expect(elements).toHaveLength(2);

Check failure on line 181 in tests/integration/tools/atlas/clusters.test.ts

View workflow job for this annotation

GitHub Actions / Run Atlas tests

tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-list-clusters > returns clusters by project

AssertionError: expected [ { type: 'text', …(1) } ] to have a length of 2 but got 1 - Expected + Received - 2 + 1 ❯ tests/integration/tools/atlas/clusters.test.ts:181:34

expect(elements[1]?.text).toContain("<untrusted-user-data-");
expect(elements[1]?.text).toContain(`${clusterName} | `);
Expand Down Expand Up @@ -256,7 +252,7 @@
} else {
expect(elements[0]?.text).toContain(`Attempting to connect to cluster "${clusterName}"...`);
}
await sleep(500);

Check failure on line 255 in tests/integration/tools/atlas/clusters.test.ts

View workflow job for this annotation

GitHub Actions / check-style

Cannot find name 'sleep'.
}
expect(connected).toBe(true);
});
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.