[][src]Module actori_web::test

Various helpers for Actori applications to use during testing.

Structs

TestBuffer

Async io buffer

TestRequest

Test Request builder.

TestServer

Test server controller

TestServerConfig

Functions

call_service

Calls service and waits for response future completion.

config

Create default test server config

default_service

Create service that responds with response with specified status code

init_service

This method accepts application builder instance, and constructs service.

load_stream
ok_service

Create service that always responds with HttpResponse::Ok()

read_body

Helper function that returns a response body of a ServiceResponse.

read_response

Helper function that returns a response body of a TestRequest

read_response_json

Helper function that returns a deserialized response body of a TestRequest

start

Start test server with default configuration

start_with

Start test server with custom configuration

unused_addr

Get first available unused address