From 94e8bbe6058fe14bd20e47c484a4be6276f1e5ce Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Wed, 3 Dec 2014 10:45:51 +0100 Subject: [PATCH] Fix error checking in unittests. --- js/server/modules/org/arangodb/testing.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/server/modules/org/arangodb/testing.js b/js/server/modules/org/arangodb/testing.js index 3f8d9f7d16..cd344a6110 100644 --- a/js/server/modules/org/arangodb/testing.js +++ b/js/server/modules/org/arangodb/testing.js @@ -823,7 +823,7 @@ testFuncs.shell_client = function(options) { var r = runInArangosh(options, instanceInfo, te); results[te] = r; - if (r !== 0 && !options.force) { + if (r.status !== true && !options.force) { break; } @@ -1052,14 +1052,14 @@ testFuncs.importing = function (options) { var r = runInArangosh(options, instanceInfo, makePath("js/server/tests/import-setup.js")); result.setup = r; - if (r !== 0) { + if (r.status !== true) { throw "banana"; } var i; for (i = 0; i < impTodo.length; i++) { r = runArangoImp(options, instanceInfo, impTodo[i]); result[impTodo[i].id] = r; - if (r !== 0 && !options.force) { + if (r.status !== true && !options.force) { throw "banana"; } } @@ -1124,7 +1124,7 @@ testFuncs.foxx_manager = function (options) { ["--configuration", "etc/relative/foxx-manager.conf", "update"]); - if (results.update === 0 || options.force) { + if (results.update.status === true || options.force) { results.search = runArangoshCmd(options, instanceInfo, ["--configuration", "etc/relative/foxx-manager.conf", @@ -1150,7 +1150,7 @@ testFuncs.dump = function (options) { var results = {}; results.setup = runInArangosh(options, instanceInfo, makePath("js/server/tests/dump-setup"+cluster+".js")); - if (results.setup === 0) { + if (results.setup.status === true) { results.dump = runArangoDumpRestore(options, instanceInfo, "dump", "UnitTestsDumpSrc"); results.restore = runArangoDumpRestore(options, instanceInfo, "restore", @@ -1213,7 +1213,7 @@ testFuncs.arangob = function (options) { continueTesting = checkInstanceAlive(instanceInfo, options); - if (r !== 0 && !options.force) { + if (r.status !== true && !options.force) { break; } }