@@ -433,7 +433,7 @@ where
433
433
mod tests {
434
434
use graph:: data:: value:: Object ;
435
435
use graph:: prelude:: serde_json:: json;
436
- use http:: header:: CONTENT_TYPE ;
436
+ use http:: header:: { CONTENT_LENGTH , CONTENT_TYPE } ;
437
437
use http:: status:: StatusCode ;
438
438
use hyper:: service:: Service ;
439
439
use hyper:: { Body , Method , Request } ;
@@ -555,7 +555,7 @@ mod tests {
555
555
556
556
let response =
557
557
futures03:: executor:: block_on ( service. call ( request) ) . expect ( "Should return a response" ) ;
558
- let errors = test_utils:: assert_error_response ( response, StatusCode :: OK , false ) ;
558
+ let errors = test_utils:: assert_error_response ( response, StatusCode :: BAD_REQUEST , false ) ;
559
559
560
560
let message = errors[ 0 ] . as_str ( ) . expect ( "Error message is not a string" ) ;
561
561
@@ -578,6 +578,7 @@ mod tests {
578
578
let request = Request :: builder ( )
579
579
. method ( Method :: POST )
580
580
. header ( CONTENT_TYPE , "text/plain; charset=utf-8" )
581
+ . header ( CONTENT_LENGTH , 100 )
581
582
. uri ( format ! (
582
583
"http://localhost:8000/subgraphs/id/{}" ,
583
584
subgraph_id
@@ -590,6 +591,8 @@ mod tests {
590
591
. await
591
592
. unwrap ( )
592
593
. expect ( "Should return a response" ) ;
594
+
595
+ println ! ( "{:?}" , response) ;
593
596
let data = test_utils:: assert_successful_response ( response) ;
594
597
595
598
// The body should match the simulated query result
0 commit comments