package
1.7.0
Repository: https://github.com/acronis/go-appkit.git
Documentation: pkg.go.dev

# Functions

AssertSamplesCountInCounter asserts that passed prometheus.Counter has proper value.
AssertSamplesCountInHistogram asserts that passed prometheus.Histogram contains the specified number of samples.
DisableWrappingErrorInResponse disables expecting wrapped error ({"error": {"domain": "{domain}", ...} -> {"domain": "{domain}", ...}) in response body.
EnableWrappingErrorInResponse enabled expecting wrapped error ({"domain": "{domain}", ...} -> {"error": {"domain": "{domain}", ...}) in response body.
GetLocalAddrWithFreeTCPPort returns 127.0.0.1:<free-tcp-port> address.
GetLocalFreeTCPPort returns free (not listening by somebody) TCP port on the 127.0.0.1 network interface.
MustGetLocalFreeTCPPort returns free (not listening by somebody) TCP port on the 127.0.0.1 network interface.
RequireEmptyBodyInRecorder asserts that passing httptest.ResponseRecorder contains empty body.
RequireEmptyBodyInResponse asserts that passing http.Responsecontains empty body.
RequireErrorInRecorder asserts that passing httptest.ResponseRecorder contains error.
RequireErrorInResponse asserts that passing http.Response contains the error.
RequireErrorIsAny asserts that at least one of the errors in err's chain matches at least one target.
RequireJSONInRecorder asserts that passing httptest.ResponseRecorder contains the data in json format.
RequireJSONInResponse asserts that passing http.Response contains the data in json format.
RequireNoErrorInChannel asserts that there is an error in buffered channel.
RequireNoWrappedErrorInRecorder asserts that passing httptest.ResponseRecorder contains no wrapped error.
RequireNoWrappedErrorInResponse asserts that passing http.Response contains the no wrapped error.
RequireSamplesCountInCounter calls AssertSamplesCountInCounter and fail test immediately in case of error.
RequireSamplesCountInHistogram calls AssertSamplesCountInHistogram and fail test immediately in case of error.
RequireStringJSONInRecorder asserts that passing httptest.ResponseRecorder contains the json string.
RequireStringJSONInResponse asserts that passing http.Response contains the json string.
RequireWrappedErrorInRecorder asserts that passing httptest.ResponseRecorder contains wrapped error.
RequireWrappedErrorInResponse asserts that passing http.Response contains the wrapped error.
WaitListeningServer waits until the server is ready to accept TCP connection on the passing address.
WaitListeningServerWithUnixSocket waits until the server is ready to accept unix socket connection on the passing address.
WaitPortAndListeningServer waits until port is known and the server is ready to accept TCP connection on the passing address.