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 DestinationIPv4() echo.Checker
- func DestinationIPv6() echo.Checker
- func Each(v Visitor) echo.Checker
- func Error() echo.Checker
- func ErrorContains(expected string) echo.Checker
- func ErrorOrNotStatus(expected int) echo.Checker
- func ErrorOrStatus(expected int) echo.Checker
- func Forbidden(p protocol.Instance) echo.Checker
- func GRPCStatus(expected codes.Code) echo.Checker
- func Host(expected string) echo.Checker
- func Hostname(expected string) echo.Checker
- func IsDNSCaptureEnabled(t framework.TestContext) bool
- func MTLSForHTTP() echo.Checker
- func NoError() echo.Checker
- func NoErrorAndStatus(expected int) echo.Checker
- func NotOK() echo.Checker
- func NotStatus(expected int) echo.Checker
- func OK() echo.Checker
- func Or(checkers ...echo.Checker) echo.Checker
- func PlaintextForHTTP() echo.Checker
- func Port(expected int) echo.Checker
- func Protocol(expected string) echo.Checker
- func ProxyProtocolVersion(expected string) echo.Checker
- func ReachedClusters(allClusters cluster.Clusters, expectedClusters cluster.Clusters) echo.Checker
- func ReachedSourceCluster(allClusters cluster.Clusters) echo.Checker
- func ReachedTargetClusters(t framework.TestContext) 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 SourceIPv4() echo.Checker
- func SourceIPv6() echo.Checker
- func Status(expected int) echo.Checker
- func TooManyRequests() echo.Checker
- func URL(expected string) echo.Checker
- type Visitor
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 DestinationIPv4 ¶
DestinationIPv4 checks the request was received by the server over IPv4
func DestinationIPv6 ¶
DestinationIPv6 checks the request was received by the server over IPv6
func ErrorContains ¶
ErrorContains is similar to Error, but checks that the error message contains the given string.
func ErrorOrNotStatus ¶
func ErrorOrStatus ¶
func Forbidden ¶
Forbidden checks that the response indicates that the request was rejected by RBAC.
func GRPCStatus ¶
GRPCStatus checks that the gRPC response status code matches the expected value.
func Hostname ¶
Hostname checks the hostname the request landed on. This differs from Host which is the request we called.
func IsDNSCaptureEnabled ¶
func IsDNSCaptureEnabled(t framework.TestContext) bool
func MTLSForHTTP ¶
func NoErrorAndStatus ¶
NoErrorAndStatus is checks that no error occurred and that the returned status code matches the expected value.
func PlaintextForHTTP ¶
func ProxyProtocolVersion ¶
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 ReachedSourceCluster ¶
ReachedSourceCluster is similar to ReachedClusters, except it only checks the reachability of source cluster only
func ReachedTargetClusters ¶
func ReachedTargetClusters(t framework.TestContext) echo.Checker
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 SourceIPv4 ¶
SourceIPv4 checks the request was sent by the client over IPv4
func SourceIPv6 ¶
SourceIPv6 checks the request was sent by the client over IPv6
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 ¶
type Visitor ¶
type Visitor func(echoClient.Response) error
Visitor is performs a partial check operation on a single message.
func VNotStatus ¶
VNotStatus is a Visitor-based version of NotStatus.
func (Visitor) And ¶
And returns a Visitor that performs a logical AND of this Visitor and the one provided.