1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove wait for list helm repos

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-08-26 08:47:00 -04:00
parent 65c8109d9d
commit 9270026c75
2 changed files with 0 additions and 30 deletions

View File

@ -27,7 +27,6 @@
*/
import type { Page } from "playwright";
import * as utils from "../helpers/utils";
import { listHelmRepositories } from "../helpers/utils";
describe("preferences page tests", () => {
let window: Page, cleanup: () => Promise<void>;
@ -66,12 +65,6 @@ describe("preferences page tests", () => {
it("ensures helm repos", async () => {
await window.click("[data-testid=kubernetes-tab]");
const repos = await listHelmRepositories(); // wait for default helm repo to be added
if (repos.length === 0) {
fail("Lens failed to add any repositories");
}
await window.waitForSelector("[data-testid=repository-name]", {
timeout: 100_000,
});

View File

@ -25,8 +25,6 @@ import * as path from "path";
import * as uuid from "uuid";
import { ElectronApplication, Frame, Page, _electron as electron } from "playwright";
import { noop } from "lodash";
import { promisify } from "util";
import { exec } from "child_process";
export const AppPaths: Partial<Record<NodeJS.Platform, string>> = {
"win32": "./dist/win-unpacked/OpenLens.exe",
@ -119,24 +117,3 @@ export async function lauchMinikubeClusterFromCatalog(window: Page): Promise<Fra
return frame;
}
export const promiseExec = promisify(exec);
type HelmRepository = {
name: string;
url: string;
};
export async function listHelmRepositories(): Promise<HelmRepository[]>{
for (let i = 0; i < 10; i += 1) {
try {
const { stdout } = await promiseExec("helm repo list -o json");
return JSON.parse(stdout);
} catch {
await new Promise(r => setTimeout(r, 2000)); // if no repositories, wait for Lens adding bitnami repository
}
}
return [];
}