From 81575b333a49c58dc1b92a2cabec83961c5ce580 Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Wed, 14 Oct 2020 17:10:58 +0300 Subject: [PATCH] Fix KubeAuthProxy unit tests (#1084) Signed-off-by: Lauri Nevala --- src/main/__test__/kube-auth-proxy.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/__test__/kube-auth-proxy.test.ts b/src/main/__test__/kube-auth-proxy.test.ts index 48f430b7c5..e7bee67c07 100644 --- a/src/main/__test__/kube-auth-proxy.test.ts +++ b/src/main/__test__/kube-auth-proxy.test.ts @@ -32,7 +32,7 @@ import { KubeAuthProxy } from "../kube-auth-proxy" import { getFreePort } from "../port" import { broadcastIpc } from "../../common/ipc" import { ChildProcess, spawn, SpawnOptions } from "child_process" -import { Kubectl } from "../kubectl" +import { bundledKubectlPath, Kubectl } from "../kubectl" import { mock, MockProxy } from 'jest-mock-extended'; import { waitUntilUsed } from 'tcp-port-used'; import { Readable } from "stream" @@ -81,7 +81,7 @@ describe("kube auth proxy tests", () => { return mockedCP.stdout }) mockSpawn.mockImplementationOnce((command: string, args: readonly string[], options: SpawnOptions): ChildProcess => { - expect(command).toBe(Kubectl.bundledKubectlPath) + expect(command).toBe(bundledKubectlPath()) return mockedCP }) mockWaitUntilUsed.mockReturnValueOnce(Promise.resolve())