Skip to content

Commit

Permalink
Merge pull request #3496 from threefoldtech/development_fix_vm_k8s_te…
Browse files Browse the repository at this point in the history
…sts_repreated_name_issue
  • Loading branch information
khaledyoussef24 authored Oct 3, 2024
2 parents 535487c + e6d17a3 commit b5a33fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 1 addition & 4 deletions packages/grid_client/tests/modules/kubernetes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jest.setTimeout(500000);
let gridClient: GridClient;
let deploymentName: string;

beforeAll(async () => {
beforeEach(async () => {
gridClient = await getClient();
deploymentName = generateString(15);
gridClient.clientOptions.projectName = `kubernetes/${deploymentName}`;
Expand Down Expand Up @@ -743,8 +743,5 @@ afterEach(async () => {
expect(res.updated).toHaveLength(0);
expect(res.deleted).toBeDefined();
}
});

afterAll(async () => {
return await gridClient.disconnect();
}, 130000);
7 changes: 2 additions & 5 deletions packages/grid_client/tests/modules/vm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jest.setTimeout(300000);
let gridClient: GridClient;
let deploymentName: string;

beforeAll(async () => {
beforeEach(async () => {
gridClient = await getClient();
deploymentName = generateString(15);
gridClient.clientOptions.projectName = `vm/${deploymentName}`;
Expand Down Expand Up @@ -568,7 +568,7 @@ test("TC1230 - VM: Deploy Multiple VMs on Different Nodes", async () => {
}
});

afterEach(async () => {
afterAll(async () => {
const vmNames = await gridClient.machines.list();
for (const name of vmNames) {
const res = await gridClient.machines.delete({ name });
Expand All @@ -577,8 +577,5 @@ afterEach(async () => {
expect(res.updated).toHaveLength(0);
expect(res.deleted).toBeDefined();
}
});

afterAll(async () => {
return await gridClient.disconnect();
}, 130000);

0 comments on commit b5a33fa

Please sign in to comment.