mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix Lens not clearing other KUBECONFIG env vars (#2297)
This commit is contained in:
1 parent
5c373a886c
commit
6c872c1aad
2 files changed
+37
-1
No files matched your search
@@ -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 });
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user