File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
crates/core/tedge/src/cli/http
tests/RobotFramework/tests/tedge Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -79,11 +79,8 @@ impl HttpCommand {
7979
8080 fn send ( request : blocking:: RequestBuilder ) -> Result < ( ) , Error > {
8181 let http_result = request. send ( ) ?;
82- let http_response = http_result. error_for_status ( ) ?;
83- let bytes = http_response. bytes ( ) ?. to_vec ( ) ;
84- let content = String :: from_utf8 ( bytes) ?;
85-
86- println ! ( "{content}" ) ;
82+ let mut http_response = http_result. error_for_status ( ) ?;
83+ http_response. copy_to ( & mut std:: io:: stdout ( ) ) ?;
8784 Ok ( ( ) )
8885 }
8986}
Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ Get Put Delete
2727 Should Be Equal ${get } test of put
2828 Execute Command curl -X DELETE http://${DEVICE_IP } :${PORT } /tedge/file-transfer/file_a
2929
30+ File transfer using tedge cli
31+ Setup skip_bootstrap=False
32+
33+ Execute Command tedge http put /tedge/file-transfer/file_b "content to be transfered"
34+ ${content } = Execute Command tedge http get /tedge/file-transfer/file_b
35+ Should Be Equal ${content } content to be transfered
36+ Execute Command tedge http delete /tedge/file-transfer/file_b
37+ Execute Command tedge http get /tedge/file-transfer/file_b exp_exit_code=1
38+
3039
3140*** Keywords ***
3241Custom Setup
You can’t perform that action at this time.
0 commit comments