1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/main/__test__/shell-session.test.ts
Sebastian Malton d96918c966
Fix windows shell not having all environment variables (#6402)
* Fix windows shell not having all environment variables

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix startup due to buildVersion dependency

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Call cleanup in computeShellEnvironment

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-10-13 07:49:58 -04:00

21 lines
730 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { clearKubeconfigEnvVars } from "../utils/clear-kube-env-vars";
describe("clearKubeconfigEnvVars tests", () => {
it("should not touch non kubeconfig keys", () => {
expect(clearKubeconfigEnvVars({ a: "22" })).toStrictEqual({ a: "22" });
});
it("should remove a single kubeconfig key", () => {
expect(clearKubeconfigEnvVars({ a: "22", kubeconfig: "1" })).toStrictEqual({ a: "22" });
});
it("should remove a two kubeconfig key", () => {
expect(clearKubeconfigEnvVars({ a: "22", kubeconfig: "1", kUbeconfig: "1" })).toStrictEqual({ a: "22" });
});
});