Skip to content

Commit

Permalink
EVEREST-1893 - Fix PSMDB sharding test and global teardown monitoring…
Browse files Browse the repository at this point in the history
… endpoints deletion (#1143)

* EVEREST-1893 - Fix PSMDB sharding test

* EVEREST-1893 - Fix global teardown to delete only existing endpoints

* chore: lint/format

* chore: empty

---------

Co-authored-by: tplavcic <4625195+tplavcic@users.noreply.github.com>
Co-authored-by: Fabio Silva <ffjs1993@gmail.com>
  • Loading branch information
3 people authored Feb 25, 2025
1 parent 34f23b7 commit d72fa51
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
15 changes: 14 additions & 1 deletion ui/apps/everest/.e2e/release/psmdb-sharding.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,20 @@ test.describe(
.getByText(size + ' nodes')
.click();

await expect(page.getByText('Nodes (' + size + ')')).toBeVisible();
await expect(
page.getByText('Nodes Per Shard (' + size + ')')
).toBeVisible();
await expect(page.getByText('Routers (3)')).toBeVisible();
await expect(page.getByText('2 shards')).toBeVisible();
await expect(
page.getByText(
'6 nodes - CPU - 6.00 CPU; Memory - 24.00 GB; Disk - 150.00 Gi'
)
).toBeVisible();
await expect(page.getByText('3 configuration servers')).toBeVisible();
await expect(
page.getByText('3 routers - CPU - 3.00 CPU; Memory - 6.00 GB')
).toBeVisible();
await populateResources(page, 0.6, 1, 1, size, 2, 0.6, 1, 2, 3);
await moveForward(page);
});
Expand Down
16 changes: 13 additions & 3 deletions ui/apps/everest/.e2e/teardown/global.teardown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import { test as setup, expect } from '@playwright/test';
import { getTokenFromLocalStorage } from '../utils/localStorage';
import { getBucketNamespacesMap } from '../constants';
import { deleteMonitoringInstance } from '@e2e/utils/monitoring-instance';
import {
deleteMonitoringInstance,
listMonitoringInstances,
} from '@e2e/utils/monitoring-instance';

setup.describe.serial('Teardown', () => {
setup('Delete backup storage', async ({ request }) => {
Expand Down Expand Up @@ -58,12 +61,19 @@ setup.describe.serial('Teardown', () => {
);

for (const [idx, namespace] of allNamespaces.entries()) {
await deleteMonitoringInstance(
const monitoringInstances = await listMonitoringInstances(
request,
namespace,
`e2e-endpoint-${idx}`,
token
);
for (const instance of monitoringInstances) {
await deleteMonitoringInstance(
request,
namespace,
instance.name,
token
);
}
}
});

Expand Down

0 comments on commit d72fa51

Please sign in to comment.