Merge pull request #1718 from balena-os/found-unmanaged-volume

Refactor debug log when unmanaged volume is found
This commit is contained in:
bulldozer-balena[bot] 2021-06-03 07:00:43 +00:00 committed by GitHub
commit eec1a32fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -33,7 +33,7 @@ export async function getAll(): Promise<Volume[]> {
volumesList.push(volume);
} catch (err) {
if (err instanceof InternalInconsistencyError) {
log.debug(`Cannot parse Volume: ${volumeInfo.Name}`);
log.debug(`Found unmanaged Volume: ${volumeInfo.Name}`);
} else {
throw err;
}

View File

@ -71,7 +71,9 @@ describe('Volume Manager', () => {
},
]);
// Check that debug message was logged saying we found a Volume not created by us
expect(logDebug.lastCall.lastArg).to.equal('Cannot parse Volume: decoy');
expect(logDebug.lastCall.lastArg).to.equal(
'Found unmanaged Volume: decoy',
);
});
});