8000 Fixing shell-request testsuite (#4696) · ashang/arangodb@ab0cb34 · GitHub
[go: up one dir, main page]

Skip to content

Commit ab0cb34

Browse files
graetzerjsteemann
authored andcommitted
Fixing shell-request testsuite (arangodb#4696)
1 parent 9d42be0 commit ab0cb34

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

js/actions/_admin/app.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,25 @@
2828
// / @author Copyright 2012-2014, triAGENS GmbH, Cologne, Germany
2929
// //////////////////////////////////////////////////////////////////////////////
3030

31-
var internal = require('internal');
32-
var console = require('console');
31+
const internal = require('internal');
32+
const console = require('console');
33+
const actions = require('@arangodb/actions');
3334

34-
var actions = require('@arangodb/actions');
35+
// //////////////////////////////////////////////////////////////////////////////
36+
// / @brief was docuBlock JSF_get_admin_echo
37+
// //////////////////////////////////////////////////////////////////////////////
38+
39+
actions.defineHttp({
40+
url: '_admin/echo',
41+
prefix: true,
42+
43+
callback: function (req, res) {
44+
res.responseCode = actions.HTTP_OK;
45+
res.contentType = 'application/json; charset=utf-8';
46+
req.rawRequestBody = internal.rawRequestBody(req);
47+
res.body = JSON.stringify(req);
48+
}
49+
});
3550

3651
// //////////////////////////////////////////////////////////////////////////////
3752
// / @brief was docuBlock JSF_get_admin_time

js/client/tests/shell/shell-request.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function RequestSuite () {
5757
////////////////////////////////////////////////////////////////////////////////
5858
/// @brief test http DELETE
5959
////////////////////////////////////////////////////////////////////////////////
60-
/*
60+
6161
testDeleteMethod: function () {
6262
var path = '/lol';
6363
var res = request.delete(buildUrl(path), {timeout: 300});
@@ -219,7 +219,6 @@ function RequestSuite () {
219219
var obj = JSON.parse(res.body);
220220
expect(obj.url).to.equal(path.pathname);
221221
},
222-
*/
223222

224223
////////////////////////////////////////////////////////////////////////////////
225224
/// @brief test 404
@@ -233,7 +232,7 @@ function RequestSuite () {
233232
expect(res).to.have.property('statusCode', 404);
234233
expect(res).to.have.property('status', 404);
235234
},
236-
/*
235+
237236
////////////////////////////////////////////////////////////////////////////////
238237
/// @brief test bad json
239238
////////////////////////////////////////////////////////////////////////////////
@@ -393,7 +392,6 @@ function RequestSuite () {
393392
expect(res).to.be.an.instanceof(request.Response);
394393
expect(res.body).to.be.an.instanceof(Buffer);
395394
}
396-
*/
397395
};
398396
}
399397

0 commit comments

Comments
 (0)
0