1
0
Fork 0

BUGFIX: when we don't start the server we mustn't try to attempt to clean up its db directories

This commit is contained in:
Wilfried Goesgens 2017-04-06 11:43:11 +02:00
parent d95205d76f
commit bf3f68ee26
1 changed files with 9 additions and 5 deletions

View File

@ -500,13 +500,17 @@ function unitTest (cases, options) {
results.status = globalStatus;
results.crashed = pu.serverCrashed;
if (globalStatus && !pu.serverCrashed) {
pu.cleanupDBDirectories(options);
if (options.server === undefined) {
if (globalStatus && !pu.serverCrashed) {
pu.cleanupDBDirectories(options);
} else {
print('not cleaning up as some tests weren\'t successful:\n' +
pu.getCleanupDBDirectories);
}
} else {
print('not cleaning up as some tests weren\'t successful:\n' +
pu.getCleanupDBDirectories);
print("not cleaning up since we didn't start the server ourselves\n");
}
try {
yaml.safeDump(JSON.parse(JSON.stringify(results)));
} catch (err) {