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

Don't log storage loading in tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-10-08 14:33:24 -04:00
parent 5fbbb99046
commit 9d75e71b4f

View File

@ -51,7 +51,7 @@ export function createAppStorage<T>(key: string, defaultValue: T, clusterId?: st
const fileName = `${clusterId ?? "app"}.json`;
const filePath = path.resolve(folder, fileName);
if (!storage.initialized && !isTestEnv) {
if (!storage.initialized) {
init(); // called once per cluster-view
}
@ -63,7 +63,9 @@ export function createAppStorage<T>(key: string, defaultValue: T, clusterId?: st
.then(data => storage.data = data)
.catch(() => null) // ignore empty / non-existing / invalid json files
.finally(() => {
logger.info(`${logPrefix} loading finished for ${filePath}`);
if (!isTestEnv) {
logger.info(`${logPrefix} loading finished for ${filePath}`);
}
storage.loaded = true;
});