File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 28
28
// / @author Copyright 2012-2014, triAGENS GmbH, Cologne, Germany
29
29
// //////////////////////////////////////////////////////////////////////////////
30
30
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' ) ;
33
34
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
+ } ) ;
35
50
36
51
// //////////////////////////////////////////////////////////////////////////////
37
52
// / @brief was docuBlock JSF_get_admin_time
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ function RequestSuite () {
57
57
////////////////////////////////////////////////////////////////////////////////
58
58
/// @brief test http DELETE
59
59
////////////////////////////////////////////////////////////////////////////////
60
- /*
60
+
61
61
testDeleteMethod : function ( ) {
62
62
var path = '/lol' ;
63
63
var res = request . delete ( buildUrl ( path ) , { timeout : 300 } ) ;
@@ -219,7 +219,6 @@ function RequestSuite () {
219
219
var obj = JSON . parse ( res . body ) ;
220
220
expect ( obj . url ) . to . equal ( path . pathname ) ;
221
221
} ,
222
- */
223
222
224
223
////////////////////////////////////////////////////////////////////////////////
225
224
/// @brief test 404
@@ -233,7 +232,7 @@ function RequestSuite () {
233
232
expect ( res ) . to . have . property ( 'statusCode' , 404 ) ;
234
233
expect ( res ) . to . have . property ( 'status' , 404 ) ;
235
234
} ,
236
- /*
235
+
237
236
////////////////////////////////////////////////////////////////////////////////
238
237
/// @brief test bad json
239
238
////////////////////////////////////////////////////////////////////////////////
@@ -393,7 +392,6 @@ function RequestSuite () {
393
392
expect ( res ) . to . be . an . instanceof ( request . Response ) ;
394
393
expect ( res . body ) . to . be . an . instanceof ( Buffer ) ;
395
394
}
396
- */
397
395
} ;
398
396
}
399
397
You can’t perform that action at this time.
0 commit comments