common

package
v0.0.0-...-69e82c2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const KindClusterCreationTimeout = "3m"

Variables

This section is empty.

Functions

func CmdEnv

func CmdEnv(cmd *exec.Cmd, c Cluster) *exec.Cmd

func DeleteTestCluster

func DeleteTestCluster(clusterName string) error

func Initialize

func Initialize(t *testing.T)

func KindClusterKubeconfig

func KindClusterKubeconfig(name string) ([]byte, error)

func LoggingInfra

func LoggingInfra(
	ctx context.Context,
	t *testing.T,
	c client.Client,
	nsInfra string,
	release string,
	tag string,
	buffer *output.Buffer,
	producerLabels map[string]string,
	hotReload *v1beta1.HotReload)

func LoggingRoute

func LoggingRoute(ctx context.Context, t *testing.T, c client.Client)

func LoggingTenant

func LoggingTenant(
	ctx context.Context,
	t *testing.T,
	c client.Client,
	nsTenant,
	nsInfra,
	release,
	tag string,
	buffer *output.Buffer,
	producerLabels map[string]string)

func RequireNoError

func RequireNoError(t *testing.T, err error)

func Resource

func Resource(obj client.Object, ns, name string) client.Object

func WithCluster

func WithCluster(name string, t *testing.T, fn func(*testing.T, Cluster), beforeCleanup func(*testing.T, Cluster) error, opts ...cluster.Option)

Types

type Cluster

type Cluster interface {
	cluster.Cluster
	LoadImages(images ...string) error
	Cleanup() error
	PrintLogs(config PrintLogConfig) error
	KubeConfigFilePath() string
	CollectTestCoverageFiles(string, string) error
}

func GetTestCluster

func GetTestCluster(clusterName string, opts ...cluster.Option) (Cluster, error)

type PanicObject

type PanicObject struct{}

func (*PanicObject) DeepCopyObject

func (*PanicObject) DeepCopyObject() runtime.Object

func (*PanicObject) GetAnnotations

func (*PanicObject) GetAnnotations() map[string]string

func (*PanicObject) GetCreationTimestamp

func (*PanicObject) GetCreationTimestamp() metav1.Time

func (*PanicObject) GetDeletionGracePeriodSeconds

func (*PanicObject) GetDeletionGracePeriodSeconds() *int64

func (*PanicObject) GetDeletionTimestamp

func (*PanicObject) GetDeletionTimestamp() *metav1.Time

func (*PanicObject) GetFinalizers

func (*PanicObject) GetFinalizers() []string

func (*PanicObject) GetGenerateName

func (*PanicObject) GetGenerateName() string

func (*PanicObject) GetGeneration

func (*PanicObject) GetGeneration() int64

func (*PanicObject) GetLabels

func (*PanicObject) GetLabels() map[string]string

func (*PanicObject) GetManagedFields

func (*PanicObject) GetManagedFields() []metav1.ManagedFieldsEntry

func (*PanicObject) GetName

func (*PanicObject) GetName() string

func (*PanicObject) GetNamespace

func (*PanicObject) GetNamespace() string

func (*PanicObject) GetObjectKind

func (*PanicObject) GetObjectKind() schema.ObjectKind

func (*PanicObject) GetOwnerReferences

func (*PanicObject) GetOwnerReferences() []metav1.OwnerReference

func (*PanicObject) GetResourceVersion

func (*PanicObject) GetResourceVersion() string
func (*PanicObject) GetSelfLink() string

func (*PanicObject) GetUID

func (*PanicObject) GetUID() types.UID

func (*PanicObject) GetZZZ_DeprecatedClusterName

func (*PanicObject) GetZZZ_DeprecatedClusterName() string

func (*PanicObject) SetAnnotations

func (*PanicObject) SetAnnotations(annotations map[string]string)

func (*PanicObject) SetCreationTimestamp

func (*PanicObject) SetCreationTimestamp(timestamp metav1.Time)

func (*PanicObject) SetDeletionGracePeriodSeconds

func (*PanicObject) SetDeletionGracePeriodSeconds(*int64)

func (*PanicObject) SetDeletionTimestamp

func (*PanicObject) SetDeletionTimestamp(timestamp *metav1.Time)

func (*PanicObject) SetFinalizers

func (*PanicObject) SetFinalizers(finalizers []string)

func (*PanicObject) SetGenerateName

func (*PanicObject) SetGenerateName(name string)

func (*PanicObject) SetGeneration

func (*PanicObject) SetGeneration(generation int64)

func (*PanicObject) SetLabels

func (*PanicObject) SetLabels(labels map[string]string)

func (*PanicObject) SetManagedFields

func (*PanicObject) SetManagedFields(managedFields []metav1.ManagedFieldsEntry)

func (*PanicObject) SetName

func (*PanicObject) SetName(name string)

func (*PanicObject) SetNamespace

func (*PanicObject) SetNamespace(namespace string)

func (*PanicObject) SetOwnerReferences

func (*PanicObject) SetOwnerReferences([]metav1.OwnerReference)

func (*PanicObject) SetResourceVersion

func (*PanicObject) SetResourceVersion(version string)
func (*PanicObject) SetSelfLink(selfLink string)

func (*PanicObject) SetUID

func (*PanicObject) SetUID(uid types.UID)

func (*PanicObject) SetZZZ_DeprecatedClusterName

func (*PanicObject) SetZZZ_DeprecatedClusterName(clusterName string)

type PrintLogConfig

type PrintLogConfig struct {
	Namespaces []string
	FilePath   string
	Limit      int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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