Fix use of bundled kubectl (#241)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Cody Belcher <cody.t.belcher@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and Cody Belcher committed 2020-04-16 11:23:42 -05:00
1 parent 04b171a043
commit 8bd912aa2a
5 files changed
+45 -3

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
jest.mock("electron")
jest.mock("../../../src/common/user-store")
import { Kubectl, bundledKubectl } from "../../../src/main/kubectl"
describe("kubectlVersion", () => {
it("returns bundled version if exactly same version used", async () => {
const kubectl = new Kubectl(bundledKubectl.kubectlVersion)
expect(kubectl.kubectlVersion).toBe(bundledKubectl.kubectlVersion)
})
it("returns bundled version if same major.minor version is used", async () => {
const kubectl = new Kubectl("1.17.0")
expect(kubectl.kubectlVersion).toBe(bundledKubectl.kubectlVersion)
})
})