From cc047e0d558ab16a81d1836f7350ed0c10c14a87 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 23 Feb 2022 16:40:01 +0200 Subject: [PATCH] fix tests Signed-off-by: Jari Kolehmainen --- src/main/__test__/kube-auth-proxy.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/__test__/kube-auth-proxy.test.ts b/src/main/__test__/kube-auth-proxy.test.ts index 7a3f4ea082..c68e8ff0b8 100644 --- a/src/main/__test__/kube-auth-proxy.test.ts +++ b/src/main/__test__/kube-auth-proxy.test.ts @@ -38,7 +38,7 @@ import type { Cluster } from "../../common/cluster/cluster"; import type { KubeAuthProxy } from "../kube-auth-proxy/kube-auth-proxy"; import { broadcastMessage } from "../../common/ipc"; import { ChildProcess, spawn } from "child_process"; -import { bundledKubectlPath, Kubectl } from "../kubectl/kubectl"; +import { Kubectl } from "../kubectl/kubectl"; import { mock, MockProxy } from "jest-mock-extended"; import { waitUntilUsed } from "tcp-port-used"; import { EventEmitter, Readable } from "stream"; @@ -49,6 +49,7 @@ import mockFs from "mock-fs"; import { getDiForUnitTesting } from "../getDiForUnitTesting"; import createKubeAuthProxyInjectable from "../kube-auth-proxy/create-kube-auth-proxy.injectable"; import { createClusterInjectionToken } from "../../common/cluster/create-cluster-injection-token"; +import path from "path"; console = new Console(stdout, stderr); @@ -194,7 +195,7 @@ describe("kube auth proxy tests", () => { return mockedCP.stdout; }); mockSpawn.mockImplementationOnce((command: string): ChildProcess => { - expect(command).toBe(bundledKubectlPath()); + expect(path.basename(command)).toBe("lens-k8s-proxy"); return mockedCP; });