Skip to content

Commit

Permalink
chore(e2): rhidp-5296 e2e - main nightly job failing on runtime confi…
Browse files Browse the repository at this point in the history
…guration change step (#2117)

* RHIDP-5296 e2e - main nightly job failing on runtime configuration change step

Signed-off-by: Gustavo Lira <guga.java@gmail.com>

* RHIDP-5296 lint format

Signed-off-by: Gustavo Lira <guga.java@gmail.com>

---------

Signed-off-by: Gustavo Lira <guga.java@gmail.com>
  • Loading branch information
gustavolira authored Dec 17, 2024
1 parent 7bb7197 commit f5def5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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!");
Expand Down
6 changes: 5 additions & 1 deletion e2e-tests/playwright/utils/kube-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class KubeClient {
namespace,
);
} catch (e) {
LOGGER.error(e.body.message);
LOGGER.error(e.body?.message);
throw e;
}
}
Expand Down Expand Up @@ -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 },
};
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit f5def5a

Please sign in to comment.