Documentation ¶
Index ¶
- func CreateDialContext(t *testing.T, ing *v1alpha1.Ingress, clients *test.Clients) func(context.Context, string, string) (net.Conn, error)
- func CreateFlakyService(t *testing.T, clients *test.Clients, period int) (string, int, context.CancelFunc)
- func CreateGRPCService(t *testing.T, clients *test.Clients, suffix string) (string, int, context.CancelFunc)
- func CreateIngress(t *testing.T, clients *test.Clients, spec v1alpha1.IngressSpec) (*v1alpha1.Ingress, context.CancelFunc)
- func CreateIngressReady(t *testing.T, clients *test.Clients, spec v1alpha1.IngressSpec) (*v1alpha1.Ingress, *http.Client, context.CancelFunc)
- func CreateIngressReadyDialContext(t *testing.T, clients *test.Clients, spec v1alpha1.IngressSpec) (*v1alpha1.Ingress, func(context.Context, string, string) (net.Conn, error), ...)
- func CreateProxyService(t *testing.T, clients *test.Clients, target string, gatewayDomain string) (string, int, context.CancelFunc)
- func CreateRuntimeService(t *testing.T, clients *test.Clients, portName string) (string, int, context.CancelFunc)
- func CreateTLSSecret(t *testing.T, clients *test.Clients, hosts []string) (string, context.CancelFunc)
- func CreateTLSSecretWithCertPool(t *testing.T, clients *test.Clients, hosts []string, ns string, ...) (string, context.CancelFunc)
- func CreateTimeoutService(t *testing.T, clients *test.Clients) (string, int, context.CancelFunc)
- func CreateWebsocketService(t *testing.T, clients *test.Clients, suffix string) (string, int, context.CancelFunc)
- func DumpResponse(t *testing.T, resp *http.Response)
- func RuntimeRequest(t *testing.T, client *http.Client, url string, opts ...RequestOption) *types.RuntimeInfo
- func RuntimeRequestWithStatus(t *testing.T, client *http.Client, url string, expectedStatus sets.Int, ...) *types.RuntimeInfo
- func UpdateIngress(t *testing.T, clients *test.Clients, name string, spec v1alpha1.IngressSpec)
- func UpdateIngressReady(t *testing.T, clients *test.Clients, name string, spec v1alpha1.IngressSpec)
- type RequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDialContext ¶
func CreateDialContext(t *testing.T, ing *v1alpha1.Ingress, clients *test.Clients) func(context.Context, string, string) (net.Conn, error)
CreateDialContext looks up the endpoint information to create a "dialer" for the provided Ingress' public ingress loas balancer. It can be used to contact external-visibility services with an HTTP client via:
client := &http.Client{ Transport: &http.Transport{ DialContext: CreateDialContext(t, ing, clients), }, }
func CreateFlakyService ¶
func CreateFlakyService(t *testing.T, clients *test.Clients, period int) (string, int, context.CancelFunc)
CreateFlakyService creates a Kubernetes service where the backing pod will succeed only every Nth request.
func CreateGRPCService ¶
func CreateGRPCService(t *testing.T, clients *test.Clients, suffix string) (string, int, context.CancelFunc)
CreateGRPCService creates a Kubernetes service that will upgrade the connection to use GRPC and echo back the received messages with the provided suffix.
func CreateIngress ¶
func CreateIngress(t *testing.T, clients *test.Clients, spec v1alpha1.IngressSpec) (*v1alpha1.Ingress, context.CancelFunc)
CreateIngress creates a Knative Ingress resource
func CreateIngressReady ¶
func CreateProxyService ¶ added in v0.13.0
func CreateProxyService(t *testing.T, clients *test.Clients, target string, gatewayDomain string) (string, int, context.CancelFunc)
CreateProxyService creates a Kubernetes service that will forward requests to the specified target. It returns the service name, the port on which the service is listening, and a "cancel" function to clean up the created resources.
func CreateRuntimeService ¶
func CreateRuntimeService(t *testing.T, clients *test.Clients, portName string) (string, int, context.CancelFunc)
CreateRuntimeService creates a Kubernetes service that will respond to the protocol specified with the given portName. It returns the service name, the port on which the service is listening, and a "cancel" function to clean up the created resources.
func CreateTLSSecret ¶
func CreateTLSSecret(t *testing.T, clients *test.Clients, hosts []string) (string, context.CancelFunc)
This is based on https://golang.org/src/crypto/tls/generate_cert.go
func CreateTLSSecretWithCertPool ¶
func CreateTLSSecretWithCertPool(t *testing.T, clients *test.Clients, hosts []string, ns string, cas *x509.CertPool) (string, context.CancelFunc)
CreateTLSSecretWithCertPool creates TLS certificate with given CertPool.
func CreateTimeoutService ¶
CreateTimeoutService creates a Kubernetes service that will respond to the protocol specified with the given portName. It returns the service name, the port on which the service is listening, and a "cancel" function to clean up the created resources.
func CreateWebsocketService ¶
func CreateWebsocketService(t *testing.T, clients *test.Clients, suffix string) (string, int, context.CancelFunc)
CreateWebsocketService creates a Kubernetes service that will upgrade the connection to use websockets and echo back the received messages with the provided suffix.
func RuntimeRequest ¶
func RuntimeRequest(t *testing.T, client *http.Client, url string, opts ...RequestOption) *types.RuntimeInfo
func RuntimeRequestWithStatus ¶ added in v0.13.0
func RuntimeRequestWithStatus(t *testing.T, client *http.Client, url string, expectedStatus sets.Int, opts ...RequestOption) *types.RuntimeInfo
func UpdateIngress ¶
UpdateIngress updates a Knative Ingress resource