Fix Lens not clearing other KUBECONFIG env vars (#2297)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-03-15 11:28:14 -04:00
1 parent 5c373a886c
commit 6c872c1aad
2 files changed
+37 -1

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
/**
* @jest-environment jsdom
*/
import { clearKubeconfigEnvVars } from "../shell-session";
describe("clearKubeconfigEnvVars tests", () => {
it("should not touch non kubeconfig keys", () => {
expect(clearKubeconfigEnvVars({ a: 1 })).toStrictEqual({ a: 1 });
});
it("should remove a single kubeconfig key", () => {
expect(clearKubeconfigEnvVars({ a: 1, kubeconfig: "1" })).toStrictEqual({ a: 1 });
});
it("should remove a two kubeconfig key", () => {
expect(clearKubeconfigEnvVars({ a: 1, kubeconfig: "1", kUbeconfig: "1" })).toStrictEqual({ a: 1 });
});
});