From 01487ad3074041d7a596b406a98b30aea9875c65 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 8 Sep 2022 09:38:13 -0400 Subject: [PATCH] Update tests Signed-off-by: Sebastian Malton --- .../add-custom-helm-repository-in-preferences.test.ts | 2 ++ .../add-helm-repository-from-list-in-preferences.test.ts | 2 ++ .../listing-active-helm-repositories-in-preferences.test.ts | 5 +++++ ...ory-from-list-of-active-repository-in-preferences.test.ts | 1 + .../get-helm-release-resources.test.ts | 4 ++-- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts b/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts index d8e14d25fa..f77a550575 100644 --- a/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts +++ b/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts @@ -167,6 +167,7 @@ describe("add custom helm repository in preferences", () => { expect(execFileMock).toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "add", "some-custom-repository", "http://some.url"], + { "maxBuffer": 34359738368 }, ); }); @@ -365,6 +366,7 @@ describe("add custom helm repository in preferences", () => { "--cert-file", "some-cert-file", ], + { "maxBuffer": 34359738368 }, ); }); }); diff --git a/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts b/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts index c46c30086e..98e94321bd 100644 --- a/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts +++ b/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts @@ -119,6 +119,7 @@ describe("add helm repository from list in preferences", () => { expect(execFileMock).toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "add", "Some to be added repository", "some-other-url"], + { "maxBuffer": 34359738368 }, ); }); @@ -227,6 +228,7 @@ describe("add helm repository from list in preferences", () => { expect(execFileMock).toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "remove", "Some already active repository"], + { "maxBuffer": 34359738368 }, ); }); diff --git a/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts b/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts index 395b4c2c8a..c8407767ef 100644 --- a/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts +++ b/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts @@ -69,6 +69,7 @@ describe("listing active helm repositories in preferences", () => { expect(execFileMock).toHaveBeenCalledWith( "some-helm-binary-path", ["env"], + { "maxBuffer": 34359738368 }, ); }); @@ -76,6 +77,7 @@ describe("listing active helm repositories in preferences", () => { expect(execFileMock).not.toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "update"], + { "maxBuffer": 34359738368 }, ); }); @@ -207,6 +209,7 @@ describe("listing active helm repositories in preferences", () => { expect(execFileMock).toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "update"], + { "maxBuffer": 34359738368 }, ); }); @@ -265,6 +268,7 @@ describe("listing active helm repositories in preferences", () => { expect(execFileMock).toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "add", "bitnami", "https://charts.bitnami.com/bitnami"], + { "maxBuffer": 34359738368 }, ); }); @@ -400,6 +404,7 @@ describe("listing active helm repositories in preferences", () => { expect(execFileMock).not.toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "add", "bitnami", "https://charts.bitnami.com/bitnami"], + { "maxBuffer": 34359738368 }, ); }); diff --git a/src/features/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts b/src/features/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts index 1eb6b7b832..7a3e787a53 100644 --- a/src/features/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts +++ b/src/features/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts @@ -86,6 +86,7 @@ describe("remove helm repository from list of active repositories in preferences expect(execFileMock).toHaveBeenCalledWith( "some-helm-binary-path", ["repo", "remove", "some-active-repository"], + { "maxBuffer": 34359738368 }, ); }); diff --git a/src/main/helm/helm-service/get-helm-release-resources/get-helm-release-resources.test.ts b/src/main/helm/helm-service/get-helm-release-resources/get-helm-release-resources.test.ts index 2ee661a46d..6c1b1c0566 100644 --- a/src/main/helm/helm-service/get-helm-release-resources/get-helm-release-resources.test.ts +++ b/src/main/helm/helm-service/get-helm-release-resources/get-helm-release-resources.test.ts @@ -48,9 +48,9 @@ describe("get helm release resources", () => { }); it("calls for release manifest", () => { - expect(execHelmMock).toHaveBeenCalledWith( + expect(execHelmMock).toHaveBeenCalledWith([ "get", "manifest", "some-release", "--namespace", "some-namespace", "--kubeconfig", "/some-kubeconfig-path", - ); + ]); }); it("does not call for resources yet", () => {