Skip to content

Commit baa00c0

Browse files
committed
front: delete the test infra at the end of e2e tests
Signed-off-by: Alice Khoudli <[email protected]>
1 parent f13e84b commit baa00c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

front/tests/global-teardown.ts

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ teardown('teardown', async ({ browser }) => {
4545
force: true,
4646
});
4747

48+
// Delete infra, unless it is currently used as a foreign key by the stdcm env in the database
49+
if (savedEnvironment && savedEnvironment.infra_id !== Number(process.env.TEST_INFRA_ID))
50+
await deleteInfra(infrastructureName);
51+
4852
logger.info('Test data teardown completed successfully.');
4953
} catch (error) {
5054
logger.error('Error during test data teardown:', error);

0 commit comments

Comments
 (0)