Documentation ¶
Index ¶
- func DefaultCluster(clusters ...*envoy_cluster_v3.Cluster) *envoy_cluster_v3.Cluster
- type Contour
- type ResourceEventHandlerWrapper
- type Response
- type StatusResult
- func (s *StatusResult) Equals(want contour_api_v1.HTTPProxyStatus) *Contour
- func (s *StatusResult) HasError(condType, reason, message string) *Contour
- func (s *StatusResult) IsInvalid() *Contour
- func (s *StatusResult) IsValid() *Contour
- func (s *StatusResult) Like(want contour_api_v1.HTTPProxyStatus) *Contour
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCluster ¶
func DefaultCluster(clusters ...*envoy_cluster_v3.Cluster) *envoy_cluster_v3.Cluster
DefaultCluster returns a copy of the default Cluster, with each Cluster given in the parameter slice merged on top. This makes it relatively fluent to compose Clusters by tweaking a few fields.
Types ¶
type Contour ¶
type Contour struct { *grpc.ClientConn *testing.T // contains filtered or unexported fields }
func (*Contour) Status ¶
func (c *Contour) Status(obj any) *StatusResult
Status returns a StatusResult object that can be used to assert on object status fields.
type ResourceEventHandlerWrapper ¶ added in v1.26.0
type ResourceEventHandlerWrapper interface { OnAdd(obj any) OnUpdate(oldObj, newObj any) OnDelete(obj any) }
ResourceEventHandlerWrapper wraps the ResourceEventHandler interface from client-go/tools/cache. The OnAdd function has a boolean parameter that we do not need for testing.
type Response ¶
type Response struct { *Contour *envoy_discovery_v3.DiscoveryResponse }
func (*Response) Equals ¶
func (r *Response) Equals(want *envoy_discovery_v3.DiscoveryResponse) *Contour
Equals tests that the response retrieved from Contour is equal to the supplied value. TODO(youngnick) This function really should be copied to an `EqualResources` function.
type StatusResult ¶ added in v1.18.0
type StatusResult struct { *Contour Err error Have *contour_api_v1.HTTPProxyStatus }
func (*StatusResult) Equals ¶ added in v1.18.0
func (s *StatusResult) Equals(want contour_api_v1.HTTPProxyStatus) *Contour
Equals asserts that the status result is not an error and matches the wanted status exactly.
func (*StatusResult) HasError ¶ added in v1.18.0
func (s *StatusResult) HasError(condType, reason, message string) *Contour
HasError asserts that there is an error on the Valid Condition in the proxy that matches the given values.
func (*StatusResult) IsInvalid ¶ added in v1.18.0
func (s *StatusResult) IsInvalid() *Contour
IsInvalid asserts that the proxy's CurrentStatus field is equal to "invalid".
func (*StatusResult) IsValid ¶ added in v1.18.0
func (s *StatusResult) IsValid() *Contour
IsValid asserts that the proxy's CurrentStatus field is equal to "valid".
func (*StatusResult) Like ¶ added in v1.18.0
func (s *StatusResult) Like(want contour_api_v1.HTTPProxyStatus) *Contour
Like asserts that the status result is not an error and matches non-empty fields in the wanted status.