mirror of https://gitee.com/bigwinds/arangodb
Fix error checking in unittests.
This commit is contained in:
parent
f46d63cb5b
commit
94e8bbe605
|
@ -823,7 +823,7 @@ testFuncs.shell_client = function(options) {
|
||||||
|
|
||||||
var r = runInArangosh(options, instanceInfo, te);
|
var r = runInArangosh(options, instanceInfo, te);
|
||||||
results[te] = r;
|
results[te] = r;
|
||||||
if (r !== 0 && !options.force) {
|
if (r.status !== true && !options.force) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1052,14 +1052,14 @@ testFuncs.importing = function (options) {
|
||||||
var r = runInArangosh(options, instanceInfo,
|
var r = runInArangosh(options, instanceInfo,
|
||||||
makePath("js/server/tests/import-setup.js"));
|
makePath("js/server/tests/import-setup.js"));
|
||||||
result.setup = r;
|
result.setup = r;
|
||||||
if (r !== 0) {
|
if (r.status !== true) {
|
||||||
throw "banana";
|
throw "banana";
|
||||||
}
|
}
|
||||||
var i;
|
var i;
|
||||||
for (i = 0; i < impTodo.length; i++) {
|
for (i = 0; i < impTodo.length; i++) {
|
||||||
r = runArangoImp(options, instanceInfo, impTodo[i]);
|
r = runArangoImp(options, instanceInfo, impTodo[i]);
|
||||||
result[impTodo[i].id] = r;
|
result[impTodo[i].id] = r;
|
||||||
if (r !== 0 && !options.force) {
|
if (r.status !== true && !options.force) {
|
||||||
throw "banana";
|
throw "banana";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1124,7 +1124,7 @@ testFuncs.foxx_manager = function (options) {
|
||||||
["--configuration",
|
["--configuration",
|
||||||
"etc/relative/foxx-manager.conf",
|
"etc/relative/foxx-manager.conf",
|
||||||
"update"]);
|
"update"]);
|
||||||
if (results.update === 0 || options.force) {
|
if (results.update.status === true || options.force) {
|
||||||
results.search = runArangoshCmd(options, instanceInfo,
|
results.search = runArangoshCmd(options, instanceInfo,
|
||||||
["--configuration",
|
["--configuration",
|
||||||
"etc/relative/foxx-manager.conf",
|
"etc/relative/foxx-manager.conf",
|
||||||
|
@ -1150,7 +1150,7 @@ testFuncs.dump = function (options) {
|
||||||
var results = {};
|
var results = {};
|
||||||
results.setup = runInArangosh(options, instanceInfo,
|
results.setup = runInArangosh(options, instanceInfo,
|
||||||
makePath("js/server/tests/dump-setup"+cluster+".js"));
|
makePath("js/server/tests/dump-setup"+cluster+".js"));
|
||||||
if (results.setup === 0) {
|
if (results.setup.status === true) {
|
||||||
results.dump = runArangoDumpRestore(options, instanceInfo, "dump",
|
results.dump = runArangoDumpRestore(options, instanceInfo, "dump",
|
||||||
"UnitTestsDumpSrc");
|
"UnitTestsDumpSrc");
|
||||||
results.restore = runArangoDumpRestore(options, instanceInfo, "restore",
|
results.restore = runArangoDumpRestore(options, instanceInfo, "restore",
|
||||||
|
@ -1213,7 +1213,7 @@ testFuncs.arangob = function (options) {
|
||||||
|
|
||||||
continueTesting = checkInstanceAlive(instanceInfo, options);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
|
|
||||||
if (r !== 0 && !options.force) {
|
if (r.status !== true && !options.force) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue