From b48b38c393fdb757ede13cf5cb92b7f234e0256e Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 9 Feb 2021 13:36:32 -0500 Subject: [PATCH] move remove config to make targets Signed-off-by: Sebastian Malton --- Makefile | 7 +++++++ integration/helpers/utils.ts | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 362c796964..ddb32a9bf6 100644 --- a/Makefile +++ b/Makefile @@ -38,16 +38,23 @@ test: binaries/client .PHONY: integration-linux integration-linux: binaries/client build-extension-types build-extensions +ifdef XDF_CONFIG_HOME + rm -rf ${XDG_CONFIG_HOME}/.config/Lens +else + rm -rf ${HOME}/.config/Lens +endif yarn build:linux yarn integration .PHONY: integration-mac integration-mac: binaries/client build-extension-types build-extensions + rm ${HOME}/Library/Application\ Support/Lens yarn build:mac yarn integration .PHONY: integration-win integration-win: binaries/client build-extension-types build-extensions + rm %APPDATA%/Lens yarn build:win yarn integration diff --git a/integration/helpers/utils.ts b/integration/helpers/utils.ts index 7cbe13c54c..3700cbde31 100644 --- a/integration/helpers/utils.ts +++ b/integration/helpers/utils.ts @@ -8,7 +8,6 @@ import { AbortController } from "abort-controller"; interface AppTestingPaths { testingPath: string, - libraryPath: string, } function getAppTestingPaths(): AppTestingPaths { @@ -16,17 +15,14 @@ function getAppTestingPaths(): AppTestingPaths { case "win32": return { testingPath: "./dist/win-unpacked/Lens.exe", - libraryPath: path.join(process.env.APPDATA, "Lens"), }; case "linux": return { testingPath: "./dist/linux-unpacked/kontena-lens", - libraryPath: path.join(process.env.XDG_CONFIG_HOME || path.join(process.env.HOME, ".config"), "Lens"), }; case "darwin": return { testingPath: "./dist/mac/Lens.app/Contents/MacOS/Lens", - libraryPath: path.join(process.env.HOME, "Library/Application\ Support/Lens"), }; default: throw new TypeError(`platform ${process.platform} is not supported`); @@ -44,8 +40,6 @@ export function describeIf(condition: boolean) { export function setup(): AppConstructorOptions { const appPath = getAppTestingPaths(); - fse.removeSync(appPath.libraryPath); // remove old install config - return { path: appPath.testingPath, args: [],