Skip to content

Commit 2564d55

Browse files
committed
update project deletion
1 parent dc70c7a commit 2564d55

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

tests/integration/tools/atlas/atlasHelpers.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ApiClient } from "../../../../src/common/atlas/apiClient.js";
44
import type { IntegrationTest } from "../../helpers.js";
55
import { setupIntegrationTest, defaultTestConfig, defaultDriverOptions } from "../../helpers.js";
66
import type { SuiteCollector } from "vitest";
7-
import { beforeAll, describe } from "vitest";
7+
import { afterAll, beforeAll, describe } from "vitest";
88

99
export type IntegrationTestFunction = (integration: IntegrationTest) => void;
1010

@@ -60,6 +60,27 @@ export function withProject(integration: IntegrationTest, fn: ProjectTestFunctio
6060
}
6161
});
6262

63+
afterAll(() => {
64+
if (!projectId) {
65+
return;
66+
}
67+
68+
const apiClient = integration.mcpServer().session.apiClient;
69+
70+
// send the delete request and ignore errors
71+
apiClient
72+
.deleteProject({
73+
params: {
74+
path: {
75+
groupId: projectId,
76+
},
77+
},
78+
})
79+
.catch((error) => {
80+
console.log("Failed to delete project:", error);
81+
});
82+
});
83+
6384
const args = {
6485
getProjectId: (): string => projectId,
6586
getIpAddress: (): string => ipAddress,

0 commit comments

Comments
 (0)