package tezt-tezos

  1. Overview
  2. Docs
type nonrec 'result t = (Node.t, 'result) t

Perform RPC calls using octez-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:Client.endpoint -> ?hooks:Tezt.Process.hooks -> ?env:string Tezt.Base.String_map.t -> ?protocol_hash:string -> Client.t -> 'result t -> 'result Lwt.t

Call an RPC using octez-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:Client.endpoint -> ?hooks:Tezt.Process.hooks -> ?env:string Tezt.Base.String_map.t -> ?protocol_hash:string -> Client.t -> 'result 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:Client.endpoint -> ?hooks:Tezt.Process.hooks -> ?env:string Tezt.Base.String_map.t -> ?protocol_hash:string -> Client.t -> 'result t -> Tezt.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:Client.endpoint -> ?hooks:Tezt.Process.hooks -> ?env:string Tezt.Base.String_map.t -> ?protocol_hash:string -> Client.t -> 'result t -> Tezt.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:Client.endpoint -> ?hooks:Tezt.Process.hooks -> ?env:string Tezt.Base.String_map.t -> ?protocol_hash:string -> Client.t -> 'result t -> Tezt.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.

OCaml

Innovation. Community. Security.