diff --git a/integration/__tests__/app.tests.ts b/integration/__tests__/app.tests.ts index fa637efb45..4a83118e11 100644 --- a/integration/__tests__/app.tests.ts +++ b/integration/__tests__/app.tests.ts @@ -14,7 +14,11 @@ describe("Lens integration tests", () => { describe("app start", () => { beforeAll(async () => { - app = await utils.appStart(); + try { + app = await utils.appStart(); + } catch (error) { + fail(error); + } }); beforeEach(() => { diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index 93836eba26..45eb1ee7cc 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -34,11 +34,21 @@ describe("Lens cluster pages", () => { }; describe("cluster add", () => { - beforeAll(async () => app = await utils.appStart()); + beforeAll(async () => { + try { + app = await utils.appStart(); + } catch (error) { + fail(error); + } + }); afterAll(async () => { - if (app?.isRunning()) { - return utils.tearDown(app); + try { + if (app?.isRunning()) { + await utils.tearDown(app); + } + } catch (error) { + fail(error); } }); @@ -56,11 +66,21 @@ describe("Lens cluster pages", () => { }; describe("cluster menu pages", () => { - beforeAll(appStartAddCluster); + beforeAll(async () => { + try { + await appStartAddCluster(); + } catch (error) { + fail(error); + } + }); afterAll(async () => { - if (app?.isRunning()) { - return utils.tearDown(app); + try { + if (app?.isRunning()) { + await utils.tearDown(app); + } + } catch (error) { + fail(error); } }); @@ -438,14 +458,23 @@ describe("Lens cluster pages", () => { beforeEach(async () => { abortContoller = new AbortController(); - await appStartAddCluster(); + + try { + await appStartAddCluster(); + } catch (error) { + fail(error); + } }); afterEach(async () => { abortContoller.abort(); - - if (app?.isRunning()) { - await utils.tearDown(app); + + try { + if (app?.isRunning()) { + await utils.tearDown(app); + } + } catch (error) { + fail(error); } }); @@ -485,11 +514,21 @@ describe("Lens cluster pages", () => { }); describe("cluster operations", () => { - beforeEach(appStartAddCluster); + beforeEach(async () => { + try { + await appStartAddCluster(); + } catch (error) { + fail(error); + } + }); afterEach(async () => { - if (app?.isRunning()) { - return utils.tearDown(app); + try { + if (app?.isRunning()) { + await utils.tearDown(app); + } + } catch (error) { + fail(error); } }); diff --git a/integration/__tests__/command-palette.tests.ts b/integration/__tests__/command-palette.tests.ts index 61f534ed51..152bb142fa 100644 --- a/integration/__tests__/command-palette.tests.ts +++ b/integration/__tests__/command-palette.tests.ts @@ -7,11 +7,21 @@ describe("Lens command palette", () => { let app: Application; describe("menu", () => { - beforeAll(async () => app = await utils.appStart()); + beforeAll(async () => { + try { + app = await utils.appStart(); + } catch (error) { + fail(error); + } + }); afterAll(async () => { - if (app?.isRunning()) { - await utils.tearDown(app); + try { + if (app?.isRunning()) { + await utils.tearDown(app); + } + } catch (error) { + fail(error); } }); diff --git a/integration/__tests__/workspace.tests.ts b/integration/__tests__/workspace.tests.ts index ded374f7b2..e23a65bf85 100644 --- a/integration/__tests__/workspace.tests.ts +++ b/integration/__tests__/workspace.tests.ts @@ -14,13 +14,21 @@ describe("Lens integration tests", () => { utils.describeIf(ready)("workspaces", () => { beforeAll(async () => { - app = await utils.appStart(); - await utils.clickWhatsNew(app); + try { + app = await utils.appStart(); + await utils.clickWhatsNew(app); + } catch (error) { + fail(error); + } }); afterAll(async () => { - if (app && app.isRunning()) { - return utils.tearDown(app); + try { + if (app?.isRunning()) { + await utils.tearDown(app); + } + } catch (error) { + fail(error); } });