Documentation ¶
Index ¶
- func Alpn(expected string) echo.Checker
- func And(checkers ...echo.Checker) echo.Checker
- func BodyContains(expected string) echo.Checker
- func Cluster(expected string) echo.Checker
- func Each(c func(r echoClient.Response) error) echo.Checker
- func Error() echo.Checker
- func ErrorContains(expected string) echo.Checker
- func ErrorOrStatus(expected int) echo.Checker
- func Forbidden(p protocol.Instance) echo.Checker
- func Host(expected string) echo.Checker
- func MTLSForHTTP() echo.Checker
- func NoError() echo.Checker
- func NoErrorAndStatus(expected int) echo.Checker
- func OK() echo.Checker
- func Or(checkers ...echo.Checker) echo.Checker
- func Port(expected int) echo.Checker
- func Protocol(expected string) echo.Checker
- func ReachedClusters(allClusters cluster.Clusters, expectedClusters cluster.Clusters) echo.Checker
- func ReachedTargetClusters(allClusters cluster.Clusters) echo.Checker
- func RequestHeader(key, expected string) echo.Checker
- func RequestHeaders(expected map[string]string) echo.Checker
- func ResponseHeader(key, expected string) echo.Checker
- func ResponseHeaders(expected map[string]string) echo.Checker
- func Status(expected int) echo.Checker
- func TooManyRequests() echo.Checker
- func URL(expected string) echo.Checker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func And ¶
And is an aggregate Checker that requires all Checkers succeed. Any nil Checkers are ignored.
func BodyContains ¶
BodyContains checks that the response body contains the given string.
func Each ¶
func Each(c func(r echoClient.Response) error) echo.Checker
Each applies the given per-response function across all responses.
func ErrorContains ¶
ErrorContains is similar to Error, but checks that the error message contains the given string.
func ErrorOrStatus ¶
func Forbidden ¶
Forbidden checks that the response indicates that the request was rejected by RBAC.
func MTLSForHTTP ¶
func NoErrorAndStatus ¶
NoErrorAndStatus is checks that no error occurred and htat the returned status code matches the expected value.
func ReachedClusters ¶
ReachedClusters returns an error if requests did not load balance as expected.
For cases where all clusters are on the same network, verifies that each of the expected clusters was reached.
For multi-network configurations, verifies the current (limited) Istio load balancing behavior when going through a gateway. Ensures that all expected networks were reached, and that all clusters on the same network as the client were reached.
func ReachedTargetClusters ¶
ReachedTargetClusters is similar to ReachedClusters, except that the set of expected clusters is retrieved from the Target of the request.
func RequestHeader ¶
func ResponseHeader ¶
func Status ¶
Status checks that the response status code matches the expected value. If the expected value is zero, checks that the response code is unset.
func TooManyRequests ¶
TooManyRequests checks that at least one message receives a StatusTooManyRequests status code.
Types ¶
This section is empty.