Top.Mail.Ru
Class luatest.server | Tarantool
 

Class luatest.server

Class luatest.server

Class to run tarantool instance.

Methods

Generates environment to run process with. The result is merged into os.environ().

Returns:

map

Establish net.box connection. It’s available in net_box field.

Perform HTTP request.

Parameters:

  • method: (string)
  • path: (string)
  • options:
    • body: (string) request body (optional)
    • json: data to encode as JSON into request body (optional)
    • http: (tab) other options for HTTP-client (optional)
    • raise: (bool) raise error when status is not in 200..299. Default to true. (optional)

Returns:

response object from HTTP client with helper methods.

Raises:

HTTPRequest error when response status is not 200.

See also:

  • luatest.http_response

Build server object.

Parameters:

  • object:
    • command: (string) Command to start server process.
    • workdir: (string) Value to be passed in TARANTOOL_WORKDIR .
    • chdir: (string) Path to cwd before running a process. (optional)
    • env: (tab) Table to pass as env variables to process. (optional)
    • args: (tab) Args to run command with. (optional)
    • http_port: (int) Value to be passed in TARANTOOL_HTTP_PORT and used to perform HTTP requests. (optional)
    • net_box_port: (int) Value to be passed in TARANTOOL_LISTEN and used for net_box connection. (optional)
    • net_box_credentials: (tab) Override default net_box credentials. (optional)
    • alias: (string) Instance alias. Used to prefix output. (optional)

Returns:

input object.

Start server process.

Stop server process.