From 4edbcc58f0e1f413b58d7d6a088f05048844ac5c Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 21 Feb 2018 18:28:49 +0100 Subject: [PATCH] remove old way to invoke unittests (#4648) --- .../HTTP/MiscellaneousFunctions/README.md | 3 -- .../Administration/JSF_post_admin_test.md | 18 -------- js/actions/_admin/app.js | 41 ------------------- 3 files changed, 62 deletions(-) delete mode 100644 Documentation/DocuBlocks/Rest/Administration/JSF_post_admin_test.md diff --git a/Documentation/Books/HTTP/MiscellaneousFunctions/README.md b/Documentation/Books/HTTP/MiscellaneousFunctions/README.md index dbe4a3a2e1..7060afaeac 100644 --- a/Documentation/Books/HTTP/MiscellaneousFunctions/README.md +++ b/Documentation/Books/HTTP/MiscellaneousFunctions/README.md @@ -32,9 +32,6 @@ This is an overview of ArangoDB's HTTP interface for miscellaneous functions. @startDocuBlock JSF_get_api_initiate - -@startDocuBlock JSF_post_admin_test - @startDocuBlock JSF_post_admin_execute diff --git a/Documentation/DocuBlocks/Rest/Administration/JSF_post_admin_test.md b/Documentation/DocuBlocks/Rest/Administration/JSF_post_admin_test.md deleted file mode 100644 index 7440a65cd1..0000000000 --- a/Documentation/DocuBlocks/Rest/Administration/JSF_post_admin_test.md +++ /dev/null @@ -1,18 +0,0 @@ - -@startDocuBlock JSF_post_admin_test -@brief show the available unittests on the server. - -@RESTHEADER{POST /_admin/test, Runs tests on server} - -@RESTALLBODYPARAM{body,object,required} -A JSON object containing an attribute *tests* which lists the files -containing the test suites. - -@RESTDESCRIPTION - -Executes the specified tests on the server and returns an object with the -test results. The object has an attribute "error" which states whether -any error occurred. The object also has an attribute "passed" which -indicates which tests passed and which did not. -@endDocuBlock - diff --git a/js/actions/_admin/app.js b/js/actions/_admin/app.js index e9724660db..8ff307e23c 100644 --- a/js/actions/_admin/app.js +++ b/js/actions/_admin/app.js @@ -416,47 +416,6 @@ actions.defineHttp({ } }); -// ////////////////////////////////////////////////////////////////////////////// -// / @brief was docuBlock JSF_post_admin_test -// ////////////////////////////////////////////////////////////////////////////// - -actions.defineHttp({ - url: '_admin/test', - prefix: false, - - callback: function (req, res) { - var body = actions.getJsonBody(req, res); - - if (body === undefined) { - return; - } - - var tests = body.tests; - if (!Array.isArray(tests)) { - actions.resultError(req, res, - actions.HTTP_BAD, arangodb.ERROR_HTTP_BAD_PARAMETER, - "expected attribute 'tests' is missing"); - return; - } - - var jsUnity = require('jsunity'); - var testResults = { passed: { }, error: false }; - - tests.forEach(function (test) { - var result = false; - try { - result = jsUnity.runTest(test); - } catch (err) {} - testResults.passed[test] = result; - if (!result) { - testResults.error = true; - } - }); - - actions.resultOk(req, res, actions.HTTP_OK, testResults); - } -}); - // ////////////////////////////////////////////////////////////////////////////// // / @brief was docuBlock JSF_post_admin_execute // //////////////////////////////////////////////////////////////////////////////