diff --git a/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts b/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts index 45ed55e946..58f57654b1 100644 --- a/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts +++ b/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts @@ -9,7 +9,7 @@ test.describe("Change app-config at e2e test runtime", () => { test.setTimeout(300000); // Increasing to 5 minutes const configMapName = "app-config-rhdh"; - const namespace = process.env.NAME_SPACE; + const namespace = process.env.NAME_SPACE || "showcase-ci-nightly"; const deploymentName = "rhdh-backstage"; const kubeUtils = new KubeClient(); @@ -29,6 +29,9 @@ test.describe("Change app-config at e2e test runtime", () => { await kubeUtils.restartDeployment(deploymentName, namespace); const common = new Common(page); + await page.context().clearCookies(); + await page.context().clearPermissions(); + await page.reload({ waitUntil: "domcontentloaded" }); await common.loginAsGuest(); await new UIhelper(page).openSidebar("Home"); await uiHelper.verifyHeading("Welcome back!"); diff --git a/e2e-tests/playwright/utils/kube-client.ts b/e2e-tests/playwright/utils/kube-client.ts index f1523a9d3d..2bac334e24 100644 --- a/e2e-tests/playwright/utils/kube-client.ts +++ b/e2e-tests/playwright/utils/kube-client.ts @@ -52,7 +52,7 @@ export class KubeClient { namespace, ); } catch (e) { - LOGGER.error(e.body.message); + LOGGER.error(e.body?.message); throw e; } } @@ -99,6 +99,9 @@ export class KubeClient { patch: object, ) { try { + console.log("updateConfigMap called"); + console.log("Namespace: ", namespace); + console.log("ConfigMap: ", configmapName); const options = { headers: { "Content-type": k8s.PatchUtils.PATCH_FORMAT_JSON_PATCH }, }; @@ -321,6 +324,7 @@ export class KubeClient { async restartDeployment(deploymentName: string, namespace: string) { try { console.log(`Scaling down deployment ${deploymentName} to 0 replicas.`); + console.log(`Deployment: ${deploymentName}, Namespace: ${namespace}`); await this.logPodConditions(namespace); await this.scaleDeployment(deploymentName, namespace, 0);