package tezt-tezos

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezt_tezos.SignerSource

Sourcetype t

A signer instance

Sourceval init : ?name:string -> ?color:Tezt.Log.Color.t -> ?event_pipe:string -> ?base_dir:string -> ?uri:Uri.t -> ?runner:Tezt.Runner.t -> ?keys:Account.key list -> unit -> t Lwt.t

Initialize a signer.

This creates a signer, waits for it to be ready, and then returns it.

The signer does not rely on a node for its initialization. While initializing the signer, we add a list of accounts keys that the signer is going to use for signing.

We also pass the uri that the signer will use to answer signing calls.

The standard output and standard error output of the signer will be logged with prefix name and color color.

Default event_pipe is a temporary file whose name is derived from name. It will be created as a named pipe so that signer events can be received.

The signer is configured to use its private base directory.

If runner is specified, the signer will be spawned on this runner using SSH.

Sourceval terminate : ?timeout:float -> t -> unit Lwt.t

Send SIGTERM and wait for the process to terminate.

Default timeout is 30 seconds, after which SIGKILL is sent.

Sourceval kill : t -> unit Lwt.t

Send SIGKILL and wait for the process to terminate.

Sourceval log_events : t -> unit

Register an event handler that logs all events.

Use this when you need to debug or reverse engineer incoming events. Usually you do not want to keep that in the final versions of your tests.

Sourceval wait_for : ?where:string -> t -> string -> (Tezt.JSON.t -> 'a option) -> 'a Lwt.t

Same as wait_for_full but ignore metadata from the file descriptor sink.

More precisely, filter is applied to the value of field "fd-sink-item.v0"."event".<name>.

If the node receives a JSON value that does not match the right JSON structure, it is not given to filter and the event is ignored. See wait_for_full to know what the JSON value must look like.

Sourcetype event = {
  1. name : string;
  2. value : Tezt.JSON.t;
  3. timestamp : float;
}

Raw events.

Sourceval on_event : t -> (event -> unit) -> unit

Add a callback to be called whenever the node emits an event.

Contrary to wait_for functions, this callback is never removed.

Listening to events with on_event will not prevent wait_for promises to be fulfilled. You can also have multiple on_event handlers, although the order in which they trigger is unspecified.

Sourceval restart : t -> unit Lwt.t

Restart the daemon.

Sourceval uri : t -> Uri.t
OCaml

Innovation. Community. Security.