Skip to content

Commit ba858d0

Browse files
committed
update to cloud-dev
1 parent eecdf16 commit ba858d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/integration/tools/atlas/atlasHelpers.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function describeWithAtlas(name: string, fn: IntegrationTestFunction): vo
1919
...defaultTestConfig,
2020
apiClientId: process.env.MDB_MCP_API_CLIENT_ID,
2121
apiClientSecret: process.env.MDB_MCP_API_CLIENT_SECRET,
22+
apiBaseUrl: process.env.MDB_MCP_API_BASE_URL ?? "https://cloud-dev.mongodb.com",
2223
}),
2324
() => defaultDriverOptions
2425
);
@@ -39,6 +40,13 @@ export function withProject(integration: IntegrationTest, fn: ProjectTestFunctio
3940
beforeAll(async () => {
4041
const apiClient = integration.mcpServer().session.apiClient;
4142

43+
// check that it has credentials
44+
if (!apiClient.hasCredentials()) {
45+
throw new Error("No credentials available");
46+
}
47+
48+
// validate access token
49+
await apiClient.validateAccessToken();
4250
try {
4351
const group = await createProject(apiClient);
4452
projectId = group.id;

0 commit comments

Comments
 (0)