integration

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnwrapEntry

func UnwrapEntry(obj resources.Object) *v1alpha1.DNSEntry

func UnwrapOwner

func UnwrapOwner(obj resources.Object) *v1alpha1.DNSOwner

func UnwrapProvider added in v0.7.9

func UnwrapProvider(obj resources.Object) *v1alpha1.DNSProvider

Types

type CheckFunc

type CheckFunc func() (bool, error)

type EntrySpecSetter added in v0.11.0

type EntrySpecSetter func(e *v1alpha1.DNSEntry)

type OwnerSpecSetter added in v0.11.0

type OwnerSpecSetter func(e *v1alpha1.DNSOwner)

type ProviderSpecSetter

type ProviderSpecSetter func(p *v1alpha1.DNSProvider)

type ProviderTestOption added in v0.12.0

type ProviderTestOption int
const (
	FailGetZones ProviderTestOption = iota
	FailDeleteEntry
	FailSecondZoneWithSameBaseDomain
	AlternativeMockName
	PrivateZones
	Quotas4PerMin
	RemoveAccess
)

type TestEnv

type TestEnv struct {
	Namespace  string
	ZonePrefix string
	Cluster    cluster.Interface
	Logger     logger.LogContext
	// contains filtered or unexported fields
}

func NewTestEnv

func NewTestEnv(kubeconfig string, namespace string) (*TestEnv, error)

func NewTestEnvNamespace added in v0.10.7

func NewTestEnvNamespace(first *TestEnv, namespace string) (*TestEnv, error)

func (*TestEnv) ApplyCRDs added in v0.18.0

func (te *TestEnv) ApplyCRDs(dir string) error

func (*TestEnv) Await

func (te *TestEnv) Await(msg string, check CheckFunc) error

func (*TestEnv) AwaitEntryDeletion

func (te *TestEnv) AwaitEntryDeletion(name string) error

func (*TestEnv) AwaitEntryError added in v0.7.9

func (te *TestEnv) AwaitEntryError(name string) error

func (*TestEnv) AwaitEntryInvalid added in v0.8.3

func (te *TestEnv) AwaitEntryInvalid(name string) error

func (*TestEnv) AwaitEntryReady

func (te *TestEnv) AwaitEntryReady(name string) error

func (*TestEnv) AwaitEntryStale added in v0.7.9

func (te *TestEnv) AwaitEntryStale(name string) error

func (*TestEnv) AwaitEntryState

func (te *TestEnv) AwaitEntryState(name string, states ...string) error

func (*TestEnv) AwaitFinalizers

func (te *TestEnv) AwaitFinalizers(obj resources.Object, expectedFinalizers ...string) error

func (*TestEnv) AwaitIngressDeletion added in v0.13.0

func (te *TestEnv) AwaitIngressDeletion(name string) error

func (*TestEnv) AwaitObjectByOwner added in v0.13.0

func (te *TestEnv) AwaitObjectByOwner(kind, name string) (resources.Object, error)

func (*TestEnv) AwaitObjectsByOwner added in v0.17.1

func (te *TestEnv) AwaitObjectsByOwner(kind, name string, count int) ([]resources.Object, error)

func (*TestEnv) AwaitProviderDeletion

func (te *TestEnv) AwaitProviderDeletion(name string) error

func (*TestEnv) AwaitProviderReady

func (te *TestEnv) AwaitProviderReady(name string) error

func (*TestEnv) AwaitProviderState

func (te *TestEnv) AwaitProviderState(name string, states ...string) error

func (*TestEnv) AwaitSecretDeletion

func (te *TestEnv) AwaitSecretDeletion(name string) error

func (*TestEnv) AwaitServiceDeletion

func (te *TestEnv) AwaitServiceDeletion(name string) error

func (*TestEnv) AwaitWithTimeout

func (te *TestEnv) AwaitWithTimeout(msg string, check CheckFunc, timeout time.Duration) error

func (*TestEnv) BuildProviderConfig added in v0.10.7

func (te *TestEnv) BuildProviderConfig(domain, domain2 string, failOptions ...ProviderTestOption) *runtime.RawExtension

func (*TestEnv) BuildProviderConfigEx added in v0.10.7

func (te *TestEnv) BuildProviderConfigEx(input mock.MockConfig, failOptions ...ProviderTestOption) *runtime.RawExtension

func (*TestEnv) CreateDNSAnnotationForService added in v0.17.1

func (te *TestEnv) CreateDNSAnnotationForService(name string, spec v1alpha1.DNSAnnotationSpec) (resources.Object, error)

func (*TestEnv) CreateEntry

func (te *TestEnv) CreateEntry(index int, baseDomain string) (resources.Object, error)

func (*TestEnv) CreateEntryGeneric added in v0.7.5

func (te *TestEnv) CreateEntryGeneric(index int, specSetter EntrySpecSetter) (resources.Object, error)

func (*TestEnv) CreateGatewayAPIGatewayWithAnnotation added in v0.18.0

func (te *TestEnv) CreateGatewayAPIGatewayWithAnnotation(name, domainName string, address *gatewayapisv1.GatewayStatusAddress, ttl int,
	routingPolicy *string, additionalAnnotations map[string]string,
) (resources.Object, error)

func (*TestEnv) CreateGatewayAPIHTTPRoute added in v0.18.0

func (te *TestEnv) CreateGatewayAPIHTTPRoute(name, hostname string, gateway resources.ObjectName) (resources.Object, error)

func (*TestEnv) CreateIngressAndIstioGatewayWithAnnotation added in v0.18.0

func (te *TestEnv) CreateIngressAndIstioGatewayWithAnnotation(
	name string,
	domainName string,
	status *networkingv1.IngressLoadBalancerIngress,
	ttl int,
	routingPolicy *string,
) (resources.Object, resources.Object, error)

func (*TestEnv) CreateIngressWithAnnotation

func (te *TestEnv) CreateIngressWithAnnotation(name, domainName, fakeExternalIP string, ttl int, routingPolicy *string,
	additionalAnnotations map[string]string,
) (resources.Object, error)

func (*TestEnv) CreateIstioGatewayWithAnnotation added in v0.18.0

func (te *TestEnv) CreateIstioGatewayWithAnnotation(name, domainName string, selector map[string]string, ttl int,
	routingPolicy *string, additionalAnnotations map[string]string,
) (resources.Object, error)

func (*TestEnv) CreateNamespace

func (te *TestEnv) CreateNamespace(namespace string) error

func (*TestEnv) CreateOwner

func (te *TestEnv) CreateOwner(name, ownerId string) (resources.Object, error)

func (*TestEnv) CreateOwnerGeneric added in v0.11.0

func (te *TestEnv) CreateOwnerGeneric(name string, setSpec OwnerSpecSetter) (resources.Object, error)

func (*TestEnv) CreateProvider

func (te *TestEnv) CreateProvider(baseDomain string, providerIndex int, secretName string, options ...ProviderTestOption) (resources.Object, string, string, error)

func (*TestEnv) CreateProviderEx

func (te *TestEnv) CreateProviderEx(providerIndex int, setSpec ProviderSpecSetter) (resources.Object, error)

func (*TestEnv) CreateSecret

func (te *TestEnv) CreateSecret(index int) (resources.Object, error)

func (*TestEnv) CreateSecretAndProvider

func (te *TestEnv) CreateSecretAndProvider(baseDomain string, index int, options ...ProviderTestOption) (resources.Object, string, string, error)

func (*TestEnv) CreateSecretEx added in v0.12.0

func (te *TestEnv) CreateSecretEx(secret *corev1.Secret) (resources.Object, error)

func (*TestEnv) CreateServiceAndIstioGatewayWithAnnotation added in v0.18.0

func (te *TestEnv) CreateServiceAndIstioGatewayWithAnnotation(name, domainName string, status *corev1.LoadBalancerIngress, ttl int,
	routingPolicy *string, additionalAnnotations map[string]string,
) (resources.Object, resources.Object, error)

func (*TestEnv) CreateServiceWithAnnotation

func (te *TestEnv) CreateServiceWithAnnotation(name, domainName string, status *corev1.LoadBalancerIngress, ttl int,
	routingPolicy *string, additionalAnnotations map[string]string,
) (resources.Object, error)

func (*TestEnv) CreateTXTEntry added in v0.7.5

func (te *TestEnv) CreateTXTEntry(index int, baseDomain string) (resources.Object, error)

func (*TestEnv) DeleteEntriesAndWait added in v0.11.3

func (te *TestEnv) DeleteEntriesAndWait(objs ...resources.Object) error

func (*TestEnv) DeleteEntryAndWait

func (te *TestEnv) DeleteEntryAndWait(obj resources.Object) error

func (*TestEnv) DeleteOwner added in v0.11.0

func (te *TestEnv) DeleteOwner(obj resources.Object) error

func (*TestEnv) DeleteProviderAndSecret

func (te *TestEnv) DeleteProviderAndSecret(pr resources.Object) error

func (*TestEnv) DeleteSecretByName

func (te *TestEnv) DeleteSecretByName(name string) error

func (*TestEnv) Errorf

func (te *TestEnv) Errorf(msgfmt string, args ...interface{})

func (*TestEnv) FindEntriesByOwner added in v0.17.1

func (te *TestEnv) FindEntriesByOwner(kind, name string) ([]resources.Object, error)

func (*TestEnv) FindEntryByOwner

func (te *TestEnv) FindEntryByOwner(kind, name string) (resources.Object, error)

func (*TestEnv) GetDNSAnnotation added in v0.17.1

func (te *TestEnv) GetDNSAnnotation(name string) (resources.Object, *v1alpha1.DNSAnnotation, error)

func (*TestEnv) GetEntry

func (te *TestEnv) GetEntry(name string) (resources.Object, error)

func (*TestEnv) GetGatewayAPIGateway added in v0.18.0

func (te *TestEnv) GetGatewayAPIGateway(name string) (resources.Object, *gatewayapisv1.Gateway, error)

func (*TestEnv) GetGatewayAPIHTTPRoute added in v0.18.0

func (te *TestEnv) GetGatewayAPIHTTPRoute(name string) (resources.Object, *gatewayapisv1.HTTPRoute, error)

func (*TestEnv) GetIngress

func (te *TestEnv) GetIngress(name string) (resources.Object, *networkingv1.Ingress, error)

func (*TestEnv) GetIstioGateway added in v0.18.0

func (te *TestEnv) GetIstioGateway(name string) (resources.Object, *istionetworkingv1beta1.Gateway, error)

func (*TestEnv) GetOwner

func (te *TestEnv) GetOwner(name string) (resources.Object, error)

func (*TestEnv) GetProvider

func (te *TestEnv) GetProvider(name string) (resources.Object, *v1alpha1.DNSProvider, error)

func (*TestEnv) GetSecret

func (te *TestEnv) GetSecret(name string) (resources.Object, error)

func (*TestEnv) GetService

func (te *TestEnv) GetService(name string) (resources.Object, *corev1.Service, error)

func (*TestEnv) HasEntryState

func (te *TestEnv) HasEntryState(name string, states ...string) (bool, error)

func (*TestEnv) HasProviderState

func (te *TestEnv) HasProviderState(name string, states ...string) (bool, error)

func (*TestEnv) Infof

func (te *TestEnv) Infof(msgfmt string, args ...interface{})

func (*TestEnv) MockInMemoryGetDNSSet added in v0.8.2

func (te *TestEnv) MockInMemoryGetDNSSet(dnsName string) (*dns.DNSSet, error)

func (*TestEnv) MockInMemoryGetDNSSetEx added in v0.10.7

func (te *TestEnv) MockInMemoryGetDNSSetEx(name, zonePrefix, dnsName string) (*dns.DNSSet, error)

func (*TestEnv) MockInMemoryHasEntry added in v0.8.2

func (te *TestEnv) MockInMemoryHasEntry(e resources.Object) error

func (*TestEnv) MockInMemoryHasEntryEx added in v0.10.7

func (te *TestEnv) MockInMemoryHasEntryEx(name, zonePrefix string, e resources.Object) error

func (*TestEnv) MockInMemoryHasNotEntry added in v0.8.2

func (te *TestEnv) MockInMemoryHasNotEntry(e resources.Object) error

func (*TestEnv) MockInMemoryHasNotEntryEx added in v0.10.7

func (te *TestEnv) MockInMemoryHasNotEntryEx(name, zonePrefix string, e resources.Object) error

func (*TestEnv) PatchIngressLoadBalancer added in v0.18.2

func (te *TestEnv) PatchIngressLoadBalancer(ingressObj resources.Object, fakeExternalIP string) error

func (*TestEnv) SecretName

func (te *TestEnv) SecretName(index int) string

func (*TestEnv) UpdateEntryDomain

func (te *TestEnv) UpdateEntryDomain(obj resources.Object, domain string) (resources.Object, error)

func (*TestEnv) UpdateEntryOwner

func (te *TestEnv) UpdateEntryOwner(obj resources.Object, ownerID *string) (resources.Object, error)

func (*TestEnv) UpdateEntryTargets added in v0.8.3

func (te *TestEnv) UpdateEntryTargets(obj resources.Object, targets ...string) (resources.Object, error)

func (*TestEnv) UpdateProviderSpec added in v0.7.9

func (te *TestEnv) UpdateProviderSpec(obj resources.Object, f func(spec *v1alpha1.DNSProviderSpec) error) (resources.Object, error)

func (*TestEnv) WaitForCRDs added in v0.12.0

func (te *TestEnv) WaitForCRDs() error

func (*TestEnv) Warnf

func (te *TestEnv) Warnf(msgfmt string, args ...interface{})

Jump to

Keyboard shortcuts

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