Refactor debug log when unmanaged volume is found

Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
This commit is contained in:
Miguel Casqueira 2021-06-02 12:33:00 -04:00
parent b76fb36249
commit ab4fb454e0
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',
);
});
});