tests

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GatewayClient *gatewayfake.Clientset
View Source
var KubeClient *k8sfake.Clientset

Functions

func AddGatewayListener

func AddGatewayListener(gw *gatewayv1.Gateway, name string, port int32, protocol gatewayv1.ProtocolType, isTLS bool)

func GetHTTPHeaderFilterV1

func GetHTTPHeaderFilterV1(actions []string) *gatewayv1.HTTPHeaderFilter

func GetHTTPRouteBackendV1

func GetHTTPRouteBackendV1(backendRefs []string) gatewayv1.HTTPBackendRef

func GetHTTPRouteFilterV1

func GetHTTPRouteFilterV1(filterType string, actions []string) gatewayv1.HTTPRouteFilter

func GetHTTPRouteMatchV1

func GetHTTPRouteMatchV1(path string, pathMatchType string, headers []string) gatewayv1.HTTPRouteMatch

func GetHTTPRouteRuleV1

func GetHTTPRouteRuleV1(paths []string, matchHeaders []string, filterActionMap map[string][]string, backendRefs [][]string) gatewayv1.HTTPRouteRule

func GetHTTPRouteRulesV1Login

func GetHTTPRouteRulesV1Login() []gatewayv1.HTTPRouteRule

func GetListenerStatusV1

func GetListenerStatusV1(ports []int32, attachedRoutes []int32) []gatewayv1.ListenerStatus

func GetListenersV1

func GetListenersV1(ports []int32, secrets ...string) []gatewayv1.Listener

func GetModelName

func GetModelName(namespace, name string) (string, string)

func GetParentReferencesV1

func GetParentReferencesV1(gatewayNames []string, namespace string, ports []int32) []gatewayv1.ParentReference

func GetRouteStatusV1

func GetRouteStatusV1(gatewayNames []string, namespace string, ports []int32, conditions map[string][]metav1.Condition) *gatewayv1.RouteStatus

func NewAviFakeClientInstance

func NewAviFakeClientInstance(kubeclient *k8sfake.Clientset, skipCachePopulation ...bool)

func SetGatewayGatewayClass

func SetGatewayGatewayClass(gw *gatewayv1.Gateway, name string)

func SetGatewayName

func SetGatewayName(gw *gatewayv1.Gateway, name string)

func SetListenerHostname

func SetListenerHostname(l *gatewayv1.Listener, hostname string)

func SetListenerTLS

func SetListenerTLS(l *gatewayv1.Listener, tlsMode gatewayv1.TLSModeType, secretName, secretNS string)

func SetupGateway

func SetupGateway(t *testing.T, name, namespace, gatewayClass string, ipAddress []gatewayv1.GatewayAddress, listeners []gatewayv1.Listener)

func SetupGatewayClass

func SetupGatewayClass(t *testing.T, name, controllerName string)

func SetupHTTPRoute

func SetupHTTPRoute(t *testing.T, name, namespace string, parentRefs []gatewayv1.ParentReference, hostnames []gatewayv1.Hostname, rules []gatewayv1.HTTPRouteRule)

func TeardownGateway

func TeardownGateway(t *testing.T, name, namespace string)

func TeardownGatewayClass

func TeardownGatewayClass(t *testing.T, name string)

func TeardownHTTPRoute

func TeardownHTTPRoute(t *testing.T, name, namespace string)

func UnsetGatewayGatewayClass

func UnsetGatewayGatewayClass(gw *gatewayv1.Gateway)

func UnsetGatewayName

func UnsetGatewayName(gw *gatewayv1.Gateway)

func UnsetListenerHostname

func UnsetListenerHostname(l *gatewayv1.Listener)

func UnsetListenerTLS

func UnsetListenerTLS(l *gatewayv1.Listener)

func UpdateGateway

func UpdateGateway(t *testing.T, name, namespace, gatewayClass string, ipAddress []gatewayv1.GatewayAddress, listeners []gatewayv1.Listener)

func UpdateHTTPRoute

func UpdateHTTPRoute(t *testing.T, name, namespace string, parentRefs []gatewayv1.ParentReference, hostnames []gatewayv1.Hostname, rules []gatewayv1.HTTPRouteRule)

func ValidateConditions

func ValidateConditions(t *testing.T, actualConditions, expectedConditions []metav1.Condition)

func ValidateGatewayListeners

func ValidateGatewayListeners(t *testing.T, actual, expected *gatewayv1.ListenerStatus)

func ValidateGatewayStatus

func ValidateGatewayStatus(t *testing.T, actualStatus, expectedStatus *gatewayv1.GatewayStatus)

func ValidateHTTPRouteStatus

func ValidateHTTPRouteStatus(t *testing.T, actualStatus, expectedStatus *gatewayv1.HTTPRouteStatus)

Types

type FakeGatewayClass

type FakeGatewayClass struct {
	Name           string
	ControllerName string
}

func (*FakeGatewayClass) Create

func (gc *FakeGatewayClass) Create(t *testing.T)

func (*FakeGatewayClass) Delete

func (gc *FakeGatewayClass) Delete(t *testing.T)

func (*FakeGatewayClass) GatewayClassV1

func (gc *FakeGatewayClass) GatewayClassV1() *gatewayv1.GatewayClass

func (*FakeGatewayClass) Update

func (gc *FakeGatewayClass) Update(t *testing.T)

type Gateway

type Gateway struct {
	*gatewayv1.Gateway
}

func (*Gateway) Create

func (g *Gateway) Create(t *testing.T)

func (*Gateway) Delete

func (g *Gateway) Delete(t *testing.T)

func (*Gateway) GatewayV1

func (g *Gateway) GatewayV1(name, namespace, gatewayClass string, address []gatewayv1.GatewayAddress, listeners []gatewayv1.Listener) *gatewayv1.Gateway

func (*Gateway) Update

func (g *Gateway) Update(t *testing.T)

type HTTPRoute

type HTTPRoute struct {
	*gatewayv1.HTTPRoute
}

func (*HTTPRoute) Create

func (hr *HTTPRoute) Create(t *testing.T)

func (*HTTPRoute) Delete

func (hr *HTTPRoute) Delete(t *testing.T)

func (*HTTPRoute) HTTPRouteV1

func (hr *HTTPRoute) HTTPRouteV1(name, namespace string, parentRefs []gatewayv1.ParentReference, hostnames []gatewayv1.Hostname, rules []gatewayv1.HTTPRouteRule) *gatewayv1.HTTPRoute

func (*HTTPRoute) Update

func (hr *HTTPRoute) Update(t *testing.T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL