1
0
Fork 0

fix broken dump_encrypted test

This commit is contained in:
jsteemann 2018-04-13 14:22:12 +02:00
parent d43f4a1b1b
commit 35a96f1113
1 changed files with 11 additions and 8 deletions

View File

@ -376,15 +376,18 @@ function dumpTestEnterpriseSuite () {
},
testShadowCollectionsOmitted : function () {
const dumpDir = fs.join(instanceInfo.rootDir, 'dump');
const collStructure = JSON.parse(
fs.read(fs.join(dumpDir, `${edges}.structure.json`))
);
const encryption = fs.read(fs.join(instanceInfo.rootDir, 'dump', 'ENCRYPTION'));
if (encryption === '' || encryption === 'none') {
const dumpDir = fs.join(instanceInfo.rootDir, 'dump');
const collStructure = JSON.parse(
fs.read(fs.join(dumpDir, `${edges}.structure.json`))
);
assertTrue(collStructure.hasOwnProperty('parameters'), collStructure);
const parameters = collStructure['parameters'];
assertFalse(parameters.hasOwnProperty('shadowCollections'),
`Property 'shadowCollections' should be hidden in collection ${edges}!`);
assertTrue(collStructure.hasOwnProperty('parameters'), collStructure);
const parameters = collStructure['parameters'];
assertFalse(parameters.hasOwnProperty('shadowCollections'),
`Property 'shadowCollections' should be hidden in collection ${edges}!`);
}
},
testVertices : function () {