Skip to content

Commit

Permalink
chore: fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe committed Oct 30, 2024
1 parent 85f9c84 commit 541cd28
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
18 changes: 6 additions & 12 deletions src/ui/HelmSnippet/__tests__/CLISnippet.unit.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@ describe("InstallAgentModal", () => {
it("renders the Helm repository installation command", () => {
render(<InstallAgentModal data={[mockInput]} />);
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(<InstallAgentModal data={mockInputWithKubOptions} />);
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();
});
});
Original file line number Diff line number Diff line change
@@ -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 \\
Expand All @@ -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 \\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 541cd28

Please sign in to comment.