support

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestTimeoutMini   = 5 * time.Second
	TestTimeoutShort  = 1 * time.Minute
	TestTimeoutMedium = 2 * time.Minute
	TestTimeoutLong   = 5 * time.Minute
)

Variables

This section is empty.

Functions

func ConditionReason

func ConditionReason[T conditions.GenericConditionType](conditionType T) func(any) string

func ConditionStatus

func ConditionStatus[T conditions.GenericConditionType](conditionType T) func(any) corev1.ConditionStatus

func CustomResourceDefinition added in v0.0.6

func CustomResourceDefinition(t Test, name string) func(g gomega.Gomega) (*apiextv1.CustomResourceDefinition, error)

func Deployment

func Deployment(t Test, name string, namespace string) func(g gomega.Gomega) (*appsv1.Deployment, error)

func Deployments added in v0.0.6

func Deployments(t Test, namespace string, selector labels.Selector) func(g gomega.Gomega) ([]appsv1.Deployment, error)

func ExtractFirstLoadBalancerIngressHostname

func ExtractFirstLoadBalancerIngressHostname() func(*netv1.Ingress) string

func Ingress

func Ingress(t Test, name string, namespace string) func(g gomega.Gomega) (*netv1.Ingress, error)

func Pod

func Pod(t Test, name string, namespace string) func(g gomega.Gomega) (*corev1.Pod, error)

func PodList added in v0.0.6

func PodList(t Test, selector string, namespace string) func(g gomega.Gomega) (*corev1.PodList, error)

func Resource added in v0.0.6

func Service

func Service(t Test, name string, namespace string) func(g gomega.Gomega) (*corev1.Service, error)

Types

type Option

type Option[T any] interface {
	// contains filtered or unexported methods
}

type T

type T struct {
	*gomega.WithT
	// contains filtered or unexported fields
}

func (*T) Cleanup added in v0.0.6

func (t *T) Cleanup(f func() []runtime.Object)

func (*T) Client

func (t *T) Client() *supportclient.Client

func (*T) Ctx

func (t *T) Ctx() context.Context

func (*T) HTTPClient added in v0.0.4

func (t *T) HTTPClient() *http.Client

func (*T) Helm added in v0.0.6

func (t *T) Helm() *helmsupport.Helm

func (*T) ID added in v0.0.6

func (t *T) ID() string

func (*T) NewTestNamespace

func (t *T) NewTestNamespace(options ...Option[*corev1.Namespace]) *corev1.Namespace

func (*T) T

func (t *T) T() *testing.T

type Test

type Test interface {
	gomega.Gomega

	T() *testing.T
	Ctx() context.Context

	ID() string
	Cleanup(func() []runtime.Object)

	Client() *supportclient.Client
	Helm() *helmsupport.Helm
	HTTPClient() *http.Client

	NewTestNamespace(...Option[*corev1.Namespace]) *corev1.Namespace
}

func With

func With(t *testing.T) Test

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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