mirror of https://gitee.com/bigwinds/arangodb
Add foxx_manager unit test to js framework.
This commit is contained in:
parent
aeaffb5fad
commit
0bf2dcd17c
|
@ -391,6 +391,17 @@ function runInArangosh (options, instanceInfo, file) {
|
||||||
return executeAndWait(arangosh, args);
|
return executeAndWait(arangosh, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function runArangoshCmd (options, instanceInfo, cmds) {
|
||||||
|
var args = makeTestingArgsClient(options);
|
||||||
|
var topDir = findTopDir();
|
||||||
|
args.push("--server.endpoint");
|
||||||
|
args.push(instanceInfo.endpoint);
|
||||||
|
args = args.concat(cmds);
|
||||||
|
var arangosh = fs.normalize(fs.join(ArangoServerState.executablePath(),
|
||||||
|
"..","arangosh"));
|
||||||
|
return executeAndWait(arangosh, args);
|
||||||
|
}
|
||||||
|
|
||||||
function performTests(options, testList) {
|
function performTests(options, testList) {
|
||||||
var instanceInfo = startInstance("tcp",options);
|
var instanceInfo = startInstance("tcp",options);
|
||||||
var results = {};
|
var results = {};
|
||||||
|
@ -693,6 +704,27 @@ testFuncs.upgrade = function (options) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
testFuncs.foxx_manager = function (options) {
|
||||||
|
print("foxx_manager tests...");
|
||||||
|
var instanceInfo = startInstance("tcp",options);
|
||||||
|
var results = {};
|
||||||
|
|
||||||
|
results.update = runArangoshCmd(options, instanceInfo,
|
||||||
|
["--configuration",
|
||||||
|
"etc/relative/foxx-manager.conf",
|
||||||
|
"update"]);
|
||||||
|
if (results.update === 0 || options.force) {
|
||||||
|
results.search = runArangoshCmd(options, instanceInfo,
|
||||||
|
["--configuration",
|
||||||
|
"etc/relative/foxx-manager.conf",
|
||||||
|
"search","itzpapalotl"]);
|
||||||
|
}
|
||||||
|
print("Shutting down...");
|
||||||
|
shutdownInstance(instanceInfo,options);
|
||||||
|
print("done.");
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
var allTests =
|
var allTests =
|
||||||
[
|
[
|
||||||
"make",
|
"make",
|
||||||
|
@ -707,7 +739,7 @@ var allTests =
|
||||||
"arangob",
|
"arangob",
|
||||||
"importing",
|
"importing",
|
||||||
"upgrade",
|
"upgrade",
|
||||||
"dfdb",
|
// "dfdb", needs input redirection, but is not a good test anyway
|
||||||
"foxx_manager",
|
"foxx_manager",
|
||||||
"authentication",
|
"authentication",
|
||||||
"authentication_parameters"
|
"authentication_parameters"
|
||||||
|
@ -761,14 +793,6 @@ function UnitTest (which, options) {
|
||||||
|
|
||||||
exports.UnitTest = UnitTest;
|
exports.UnitTest = UnitTest;
|
||||||
|
|
||||||
// PROBLEME:
|
|
||||||
// context-Problem wg. HTTP REST execute statt command line
|
|
||||||
// ==> testMode
|
|
||||||
// shell_server:
|
|
||||||
// "js/server/tests/transactions.js",
|
|
||||||
// shell_server_ahuacatl:
|
|
||||||
// "js/server/tests/ahuacatl-functions.js",
|
|
||||||
//
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// --SECTION-- END-OF-FILE
|
// --SECTION-- END-OF-FILE
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue