mirror of https://gitee.com/bigwinds/arangodb
move replication & js http api tests into more intuitive locations
This commit is contained in:
parent
b4d125dcc2
commit
d1a6add6ab
|
@ -26,9 +26,7 @@
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const functionsDocumentation = {
|
const functionsDocumentation = {
|
||||||
'server_http': 'http server tests in Mocha',
|
|
||||||
'shell_client': 'shell client tests',
|
'shell_client': 'shell client tests',
|
||||||
'shell_replication': 'shell replication tests',
|
|
||||||
'shell_server': 'shell server tests',
|
'shell_server': 'shell server tests',
|
||||||
'shell_server_aql': 'AQL tests in the server',
|
'shell_server_aql': 'AQL tests in the server',
|
||||||
'shell_server_only': 'server specific tests'
|
'shell_server_only': 'server specific tests'
|
||||||
|
@ -40,22 +38,6 @@ const optionsDocumentation = [
|
||||||
|
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const tu = require('@arangodb/test-utils');
|
const tu = require('@arangodb/test-utils');
|
||||||
const pu = require('@arangodb/process-utils');
|
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
|
||||||
// / @brief TEST: shell_replication
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
function shellReplication (options) {
|
|
||||||
let testCases = tu.scanTestPath('js/common/tests/replication');
|
|
||||||
|
|
||||||
var opts = {
|
|
||||||
'replication': true
|
|
||||||
};
|
|
||||||
_.defaults(opts, options);
|
|
||||||
|
|
||||||
return tu.performTests(opts, testCases, 'shell_replication', tu.runThere);
|
|
||||||
}
|
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
// / @brief TEST: shell_client
|
// / @brief TEST: shell_client
|
||||||
|
@ -68,16 +50,6 @@ function shellClient (options) {
|
||||||
return tu.performTests(options, testCases, 'shell_client', tu.runInArangosh);
|
return tu.performTests(options, testCases, 'shell_client', tu.runInArangosh);
|
||||||
}
|
}
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
|
||||||
// / @brief TEST: shell_http
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
function serverHttp (options) {
|
|
||||||
let testCases = tu.scanTestPath('js/common/tests/http');
|
|
||||||
|
|
||||||
return tu.performTests(options, testCases, 'server_http', tu.runThere);
|
|
||||||
}
|
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
// / @brief TEST: shell_server
|
// / @brief TEST: shell_server
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -131,14 +103,11 @@ function shellServerAql (options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup (testFns, defaultFns, opts, fnDocs, optionsDoc) {
|
function setup (testFns, defaultFns, opts, fnDocs, optionsDoc) {
|
||||||
testFns['shell_replication'] = shellReplication;
|
|
||||||
testFns['shell_client'] = shellClient;
|
testFns['shell_client'] = shellClient;
|
||||||
testFns['server_http'] = serverHttp;
|
|
||||||
testFns['shell_server'] = shellServer;
|
testFns['shell_server'] = shellServer;
|
||||||
testFns['shell_server_aql'] = shellServerAql;
|
testFns['shell_server_aql'] = shellServerAql;
|
||||||
testFns['shell_server_only'] = shellServerOnly;
|
testFns['shell_server_only'] = shellServerOnly;
|
||||||
|
|
||||||
defaultFns.push('server_http');
|
|
||||||
defaultFns.push('shell_client');
|
defaultFns.push('shell_client');
|
||||||
defaultFns.push('shell_server');
|
defaultFns.push('shell_server');
|
||||||
defaultFns.push('shell_server_aql');
|
defaultFns.push('shell_server_aql');
|
||||||
|
|
|
@ -28,14 +28,31 @@
|
||||||
const functionsDocumentation = {
|
const functionsDocumentation = {
|
||||||
'replication_ongoing': 'replication ongoing tests',
|
'replication_ongoing': 'replication ongoing tests',
|
||||||
'replication_static': 'replication static tests',
|
'replication_static': 'replication static tests',
|
||||||
'replication_sync': 'replication sync tests'
|
'replication_sync': 'replication sync tests',
|
||||||
|
'shell_replication': 'shell replication tests'
|
||||||
};
|
};
|
||||||
const optionsDocumentation = [
|
const optionsDocumentation = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const _ = require('lodash');
|
||||||
const pu = require('@arangodb/process-utils');
|
const pu = require('@arangodb/process-utils');
|
||||||
const tu = require('@arangodb/test-utils');
|
const tu = require('@arangodb/test-utils');
|
||||||
|
|
||||||
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
// / @brief TEST: shell_replication
|
||||||
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
function shellReplication (options) {
|
||||||
|
let testCases = tu.scanTestPath('js/common/tests/replication');
|
||||||
|
|
||||||
|
var opts = {
|
||||||
|
'replication': true
|
||||||
|
};
|
||||||
|
_.defaults(opts, options);
|
||||||
|
|
||||||
|
return tu.performTests(opts, testCases, 'shell_replication', tu.runThere);
|
||||||
|
}
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
// / @brief TEST: replication_ongoing
|
// / @brief TEST: replication_ongoing
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -222,6 +239,7 @@ function replicationSync (options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup (testFns, defaultFns, opts, fnDocs, optionsDoc) {
|
function setup (testFns, defaultFns, opts, fnDocs, optionsDoc) {
|
||||||
|
testFns['shell_replication'] = shellReplication;
|
||||||
testFns['replication_ongoing'] = replicationOngoing;
|
testFns['replication_ongoing'] = replicationOngoing;
|
||||||
testFns['replication_static'] = replicationStatic;
|
testFns['replication_static'] = replicationStatic;
|
||||||
testFns['replication_sync'] = replicationSync;
|
testFns['replication_sync'] = replicationSync;
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const functionsDocumentation = {
|
const functionsDocumentation = {
|
||||||
|
'server_http': 'http server tests in Mocha',
|
||||||
'http_replication': 'http replication tests',
|
'http_replication': 'http replication tests',
|
||||||
'http_server': 'http server tests in Ruby',
|
'http_server': 'http server tests in Ruby',
|
||||||
'ssl_server': 'https server tests'
|
'ssl_server': 'https server tests'
|
||||||
|
@ -50,6 +51,17 @@ const RED = require('internal').COLORS.COLOR_RED;
|
||||||
const RESET = require('internal').COLORS.COLOR_RESET;
|
const RESET = require('internal').COLORS.COLOR_RESET;
|
||||||
// const YELLOW = require('internal').COLORS.COLOR_YELLOW;
|
// const YELLOW = require('internal').COLORS.COLOR_YELLOW;
|
||||||
|
|
||||||
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
// / @brief TEST: shell_http
|
||||||
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
function serverHttp (options) {
|
||||||
|
// first starts to replace rspec:
|
||||||
|
let testCases = tu.scanTestPath('js/common/tests/http');
|
||||||
|
|
||||||
|
return tu.performTests(options, testCases, 'server_http', tu.runThere);
|
||||||
|
}
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
// / @brief runs ruby tests using RSPEC
|
// / @brief runs ruby tests using RSPEC
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -282,8 +294,10 @@ function sslServer (options) {
|
||||||
function setup (testFns, defaultFns, opts, fnDocs, optionsDoc) {
|
function setup (testFns, defaultFns, opts, fnDocs, optionsDoc) {
|
||||||
testFns['http_replication'] = httpReplication;
|
testFns['http_replication'] = httpReplication;
|
||||||
testFns['http_server'] = httpServer;
|
testFns['http_server'] = httpServer;
|
||||||
|
testFns['server_http'] = serverHttp;
|
||||||
testFns['ssl_server'] = sslServer;
|
testFns['ssl_server'] = sslServer;
|
||||||
|
|
||||||
|
defaultFns.push('server_http');
|
||||||
defaultFns.push('http_server');
|
defaultFns.push('http_server');
|
||||||
defaultFns.push('ssl_server');
|
defaultFns.push('ssl_server');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue