Class cartridge.test-helpers.server | Tarantool
Tarantool Cartridge Table of contents Class cartridge.test-helpers.server

Class cartridge.test-helpers.server

Extended luatest.Server class to run a cartridge instance.

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



Start the server.

Stop server process.

Perform GraphQL request.


  • request:
    • query: (string) grapqhl query
    • variables: (optional table) variables for graphql query
    • raise: (optional boolean) raise if response contains an error(default: true)
  • http_options: (table) passed to http_request options. (optional)


(table) parsed response JSON.


  • HTTPRequest error
  • GraphQL error

Advertise this server to the cluster.


  • main_server: Server to perform GraphQL request on.
  • options:
    • timeout: request timeout

Update server’s replicaset config.


  • config:
    • uuid: replicaset uuid
    • roles: list of roles
    • master:
    • weight:

Upload application config.


  • config: (string or table) * table will be encoded as yaml and posted to /admin/config.
  • opts: (table) * http request options

Download application config.

Build server object.


  • object:
    • command: (string) Command to start server process.
    • workdir: (string) Value to be passed in TARANTOOL_WORKDIR .
    • chdir: (bool) Path to cwd before starting 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)
    • advertise_port: (int) Value to generate TARANTOOL_ADVERTISE_URI and used for net_box connection.
    • net_box_port: (int) Alias for advertise_port . (optional)
    • net_box_credentials: (tab) Override default net_box credentials. (optional)
    • alias: (string) Instance alias.
    • cluster_cookie: (string) Value to be passed in TARANTOOL_CLUSTER_COOKIE and used as default net_box password.
    • instance_uuid: (string) Server identifier. (optional)
    • replicaset_uuid: (string) Replicaset identifier. (optional)
    • zone: (string) Vshard zone. (optional)
    • swim_period: (number) SWIM protocol period in seconds. (optional)


input object

Found what you were looking for?