From 35a96f1113d4be6a1e98899498e93a0a55063562 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 13 Apr 2018 14:22:12 +0200 Subject: [PATCH] fix broken dump_encrypted test --- js/server/tests/dump/dump-mmfiles-cluster.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/js/server/tests/dump/dump-mmfiles-cluster.js b/js/server/tests/dump/dump-mmfiles-cluster.js index 692c33162d..746060c270 100644 --- a/js/server/tests/dump/dump-mmfiles-cluster.js +++ b/js/server/tests/dump/dump-mmfiles-cluster.js @@ -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 () {