mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Broadcast cluster's disconnected state before stopping KubeAuthProxy (#4273)
This commit is contained in:
1 parent
8c9e3b2fdc
commit
8081d35f9c
7 files changed
+47
-24
No files matched your search
@@ -36,6 +36,8 @@ jest.mock("winston", () => ({
|
||||
label: jest.fn(),
|
||||
timestamp: jest.fn(),
|
||||
printf: jest.fn(),
|
||||
padLevels: jest.fn(),
|
||||
ms: jest.fn(),
|
||||
},
|
||||
createLogger: jest.fn().mockReturnValue(logger),
|
||||
transports: {
|
||||
@@ -49,12 +51,31 @@ jest.mock("../context-handler");
|
||||
jest.mock("request");
|
||||
jest.mock("request-promise-native");
|
||||
|
||||
jest.mock("electron", () => ({
|
||||
app: {
|
||||
getVersion: () => "99.99.99",
|
||||
getName: () => "lens",
|
||||
setName: jest.fn(),
|
||||
setPath: jest.fn(),
|
||||
getPath: () => "tmp",
|
||||
getLocale: () => "en",
|
||||
setLoginItemSettings: jest.fn(),
|
||||
},
|
||||
ipcMain: {
|
||||
on: jest.fn(),
|
||||
once: jest.fn(),
|
||||
handle: jest.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
import { Console } from "console";
|
||||
import mockFs from "mock-fs";
|
||||
import { AppPaths } from "../../common/app-paths";
|
||||
import { Cluster } from "../cluster";
|
||||
import { Kubectl } from "../kubectl";
|
||||
|
||||
console = new Console(process.stdout, process.stderr); // fix mockFS
|
||||
AppPaths.init();
|
||||
|
||||
describe("create clusters", () => {
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in new issue
Block a user