Merge branch 'master' into electron-11.4.3

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen committed 2021-04-22 18:46:48 +03:00
commit e38addef78
187 files changed
+1687 -31107

No files matched your search

+3 -3
View File
@@ -43,7 +43,7 @@ describe("Lens integration tests", () => {
describe("preferences page", () => {
// it('shows "preferences"', async () => {
// const appName: string = process.platform === "darwin" ? "Lens" : "File";
// const appName: string = process.platform === "darwin" ? "OpenLens" : "File";
// await app.mainProcess.send("test-menu-item-click", appName, "Preferences");
// await app.client.waitUntilTextExists("[data-testid=application-header]", "APPLICATION");
@@ -62,8 +62,8 @@ describe("Lens integration tests", () => {
it("ensures helm repos", async () => {
const repos = await listHelmRepositories();
if (!repos[0]) {
fail("Lens failed to add Bitnami repository");
if (repos.length === 0) {
fail("Lens failed to add any repositories");
}
await app.client.elementClick("[data-testid=kube-tab]");
+7 -9
View File
@@ -3,9 +3,9 @@ import * as util from "util";
import { exec } from "child_process";
const AppPaths: Partial<Record<NodeJS.Platform, string>> = {
"win32": "./dist/win-unpacked/Lens.exe",
"linux": "./dist/linux-unpacked/kontena-lens",
"darwin": "./dist/mac/Lens.app/Contents/MacOS/Lens",
"win32": "./dist/win-unpacked/OpenLens.exe",
"linux": "./dist/linux-unpacked/open-lens",
"darwin": "./dist/mac/OpenLens.app/Contents/MacOS/OpenLens",
};
interface DoneCallback {
@@ -113,16 +113,14 @@ type HelmRepository = {
url: string;
};
export async function listHelmRepositories(retries = 0): Promise<HelmRepository[]>{
if (retries < 5) {
export async function listHelmRepositories(): Promise<HelmRepository[]>{
for (let i = 0; i < 10; i += 1) {
try {
const { stdout: reposJson } = await promiseExec("helm repo list -o json");
const { stdout } = await promiseExec("helm repo list -o json");
return JSON.parse(reposJson);
return JSON.parse(stdout);
} catch {
await new Promise(r => setTimeout(r, 2000)); // if no repositories, wait for Lens adding bitnami repository
return await listHelmRepositories((retries + 1));
}
}