Module Teztale.Server

type conf = {
  1. name : string;
  2. interface : interface;
  3. users : user list;
  4. admin : user;
  5. public_directory : string option;
}

See parameters of run function for details.

type filenames = {
  1. conf_filename : string;
  2. db_filename : string;
}

Expose paths of the files involved in the test:

  • Server configuration file
  • SQLite database
type t = {
  1. process : Tezt_wrapper.Process.t;
  2. filenames : filenames;
  3. conf : conf;
}
val run : ?runner:Tezt_wrapper.Runner.t -> ?path:string -> ?name:string -> ?address:string -> ?port:int -> ?users:user list -> ?admin:user -> ?public_directory:string -> unit -> t Lwt.t

run ?runner ?path ?name ?address ?port ?users ?admin ?public_directory ()

Spawn a teztale server with some given parameters:

  • runner: runner used to spawn the process
  • path: path of the teztale server executable
  • name: name the the server used in logs
  • address: where teztale server will be listening on (default is 127.0.0.1)
  • port: port associated with address
  • users: list of archivers allowed to feed the server. You can add users once the server is started using the add_user function.
  • admin: credential used for adming tasks such as adding an allowed archiver default is admin:password
  • public_directory: TODO
val wait_for_readiness : t -> unit Lwt.t

Wait until teztale server is listening to its defined interface

val add_user : ?runner:Tezt_wrapper.Runner.t -> t -> ?public_address:string -> user -> (unit, exn) Stdlib.Result.t Lwt.t

add_user server user Add an archiver (its credentials) allowed to feed the database.