Client.RPC
Perform RPC calls using mavkit-client
.
RPC calls performed this way are slower and should only be used to test the rpc
command of the client.
val call :
?log_command:bool ->
?log_status_on_exit:bool ->
?log_output:bool ->
?better_errors:bool ->
?endpoint:endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
?env:string Tezt_wrapper.Base.String_map.t ->
?protocol_hash:string ->
t ->
'result RPC_core.t ->
'result Lwt.t
Call an RPC using mavkit-client rpc
.
The response body is parsed as JSON, then decoded using the decode function of the RPC description.
The following arguments:
log_command
;log_status_on_exit
;log_output
;better_errors
;endpoint
;hooks
;env
;protocol_hash
; are passed to Client.rpc
.val call_raw :
?log_command:bool ->
?log_status_on_exit:bool ->
?log_output:bool ->
?better_errors:bool ->
?endpoint:endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
?env:string Tezt_wrapper.Base.String_map.t ->
?protocol_hash:string ->
t ->
'result RPC_core.t ->
string Lwt.t
Call an RPC, but do not parse the client output.
val call_json :
?log_command:bool ->
?log_status_on_exit:bool ->
?log_output:bool ->
?better_errors:bool ->
?endpoint:endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
?env:string Tezt_wrapper.Base.String_map.t ->
?protocol_hash:string ->
t ->
'result RPC_core.t ->
Tezt_wrapper.JSON.t Lwt.t
Call an RPC, but do not decode the client output, only parse it.
val schema :
?log_command:bool ->
?log_status_on_exit:bool ->
?log_output:bool ->
?better_errors:bool ->
?endpoint:endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
?env:string Tezt_wrapper.Base.String_map.t ->
?protocol_hash:string ->
t ->
'result RPC_core.t ->
Tezt_wrapper.JSON.t Lwt.t
Get the schema of an RPC as JSON.
val spawn :
?log_command:bool ->
?log_status_on_exit:bool ->
?log_output:bool ->
?better_errors:bool ->
?endpoint:endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
?env:string Tezt_wrapper.Base.String_map.t ->
?protocol_hash:string ->
t ->
'result RPC_core.t ->
Tezt_wrapper.JSON.t Runnable.process
Same as call_raw
, but do not wait for the process to exit.
Because this function is mostly used to test error cases, the response body is not decoded.