Don't log storage loading in tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2021-10-08 14:33:24 -04:00
1 parent 5fbbb99046
commit 9d75e71b4f
1 file changed
+4 -2
+4 -2
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;
});