From 541cd288b2e0802b6c87ec9bf5d194495205a675 Mon Sep 17 00:00:00 2001 From: Maina Wycliffe Date: Wed, 30 Oct 2024 18:51:07 +0300 Subject: [PATCH] chore: fix failing tests --- .../__tests__/CLISnippet.unit.test.tsx | 18 ++++++------------ .../CLISnippet.unit.test.tsx.snap | 8 ++++---- .../FluxSnippet.unit.test.tsx.snap | 8 ++++---- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/ui/HelmSnippet/__tests__/CLISnippet.unit.test.tsx b/src/ui/HelmSnippet/__tests__/CLISnippet.unit.test.tsx index 8793d3657..3c5cb921d 100644 --- a/src/ui/HelmSnippet/__tests__/CLISnippet.unit.test.tsx +++ b/src/ui/HelmSnippet/__tests__/CLISnippet.unit.test.tsx @@ -12,24 +12,18 @@ describe("InstallAgentModal", () => { it("renders the Helm repository installation command", () => { render(); expect( - screen.getByText( - "helm repo add mission-control-agent flanksource/mission-control-agent", - { - exact: false - } - ).textContent + screen.getByText("helm repo add flanksource", { + exact: false + }).textContent ).toMatchSnapshot(); }); it("renders the Helm repository installation command with kube command", () => { render(); expect( - screen.getByText( - "helm repo add mission-control-agent flanksource/mission-control-agent", - { - exact: false - } - ).textContent + screen.getByText("helm repo add flanksource", { + exact: false + }).textContent ).toMatchSnapshot(); }); }); diff --git a/src/ui/HelmSnippet/__tests__/__snapshots__/CLISnippet.unit.test.tsx.snap b/src/ui/HelmSnippet/__tests__/__snapshots__/CLISnippet.unit.test.tsx.snap index 0bcd53a5f..279bb0f76 100644 --- a/src/ui/HelmSnippet/__tests__/__snapshots__/CLISnippet.unit.test.tsx.snap +++ b/src/ui/HelmSnippet/__tests__/__snapshots__/CLISnippet.unit.test.tsx.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`InstallAgentModal renders the Helm repository installation command 1`] = ` -"helm repo add mission-control-agent flanksource/mission-control-agent +"helm repo add flanksource -helm install mc-agent flanksource/mission-control-agent -n "mission-control-agent" \\ +helm install mission-control-agent flanksource/mission-control-agent -n "mission-control-agent" \\ --set upstream.createSecret=true \\ --set upstream.host=http://localhost:3000 \\ --set upstream.username=token \\ @@ -17,9 +17,9 @@ helm install mc-agent flanksource/mission-control-agent -n "mission-control-agen `; exports[`InstallAgentModal renders the Helm repository installation command with kube command 1`] = ` -"helm repo add mission-control-agent flanksource/mission-control-agent +"helm repo add flanksource -helm install mc-agent flanksource/mission-control-agent -n "mission-control-agent" \\ +helm install mission-control-agent flanksource/mission-control-agent -n "mission-control-agent" \\ --set upstream.createSecret=true \\ --set upstream.host=http://localhost:3000 \\ --set upstream.username=token \\ diff --git a/src/ui/HelmSnippet/__tests__/__snapshots__/FluxSnippet.unit.test.tsx.snap b/src/ui/HelmSnippet/__tests__/__snapshots__/FluxSnippet.unit.test.tsx.snap index d2f5f84d7..d41e36220 100644 --- a/src/ui/HelmSnippet/__tests__/__snapshots__/FluxSnippet.unit.test.tsx.snap +++ b/src/ui/HelmSnippet/__tests__/__snapshots__/FluxSnippet.unit.test.tsx.snap @@ -6,7 +6,7 @@ kind: Namespace metadata: name: mission-control-agent --- -apiVersion: source.toolkit.fluxcd.io/v1beta1 +apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: flanksource @@ -15,7 +15,7 @@ spec: interval: 5m0s url: https://flanksource.github.io/charts --- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 +apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: name: mission-control-agent @@ -47,7 +47,7 @@ kind: Namespace metadata: name: mission-control-agent --- -apiVersion: source.toolkit.fluxcd.io/v1beta1 +apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: flanksource @@ -56,7 +56,7 @@ spec: interval: 5m0s url: https://flanksource.github.io/charts --- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 +apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: name: mission-control-agent