testutil

package
v0.0.0-...-9d657d7 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertDepContainerEnvRemainEmpty

func AssertDepContainerEnvRemainEmpty(ctx context.Context, k8sClient client.Client, dep *appsv1.Deployment)

func AssertDepContainerSingleEnv

func AssertDepContainerSingleEnv(ctx context.Context, k8sClient client.Client, dep *appsv1.Deployment, envName string, envValue string)

func AssertDepContainerSingleEnvBecomesEmpty

func AssertDepContainerSingleEnvBecomesEmpty(ctx context.Context, k8sClient client.Client, dep *appsv1.Deployment)

func AssertDepContainerSingleEnvRemainsSame

func AssertDepContainerSingleEnvRemainsSame(ctx context.Context, k8sClient client.Client, dep *appsv1.Deployment, envName string, envValue string)

func AssertDeploymentAnnotationRetained

func AssertDeploymentAnnotationRetained(ctx context.Context, k8sClient client.Client, dep *appsv1.Deployment, annotationKey string, annotationValue string)

func AssertInstrumentedApplicationDeleted

func AssertInstrumentedApplicationDeleted(ctx context.Context, k8sClient client.Client, instrumentedApplication *odigosv1.InstrumentedApplication)

func AssertInstrumentedApplicationRetained

func AssertInstrumentedApplicationRetained(ctx context.Context, k8sClient client.Client, instrumentedApplication *odigosv1.InstrumentedApplication)

func AssertReportedNameAnnotationDeletedDaemonSet

func AssertReportedNameAnnotationDeletedDaemonSet(ctx context.Context, k8sClient client.Client, ds *appsv1.DaemonSet)

func AssertReportedNameAnnotationDeletedDeployment

func AssertReportedNameAnnotationDeletedDeployment(ctx context.Context, k8sClient client.Client, dep *appsv1.Deployment)

func AssertReportedNameAnnotationDeletedStatefulSet

func AssertReportedNameAnnotationDeletedStatefulSet(ctx context.Context, k8sClient client.Client, sts *appsv1.StatefulSet)

func DeleteOdigosInstrumentationLabel

func DeleteOdigosInstrumentationLabel[W client.Object](obj W) W

func IsDeploymentSingleContainerSingleEnv

func IsDeploymentSingleContainerSingleEnv(obj *appsv1.Deployment, envName string, envValue string) bool

func MockGetDefaultSDKs

func MockGetDefaultSDKs() map[common.ProgrammingLanguage]common.OtelSdk

func NewMockDataCollection

func NewMockDataCollection() *odigosv1.CollectorsGroup

func NewMockEmptyInstrumentationRule

func NewMockEmptyInstrumentationRule(name, ns string) *odigosv1.InstrumentationRule

func NewMockInstrumentedApplication

func NewMockInstrumentedApplication(workloadObject client.Object) *odigosv1.InstrumentedApplication

givin a workload object (deployment, daemonset, statefulset) return a mock instrumented application with a single container with the GoProgrammingLanguage

func NewMockNamespace

func NewMockNamespace() *corev1.Namespace

func NewMockTestDaemonSet

func NewMockTestDaemonSet(ns *corev1.Namespace) *appsv1.DaemonSet

func NewMockTestDeployment

func NewMockTestDeployment(ns *corev1.Namespace) *appsv1.Deployment

func NewMockTestStatefulSet

func NewMockTestStatefulSet(ns *corev1.Namespace) *appsv1.StatefulSet

func NewOdigosSystemNamespace

func NewOdigosSystemNamespace() *corev1.Namespace

func SetDefaultSDK

func SetDefaultSDK(language common.ProgrammingLanguage, sdk common.OtelSdk)

func SetDeploymentContainerEnv

func SetDeploymentContainerEnv(obj *appsv1.Deployment, envName string, envValue string) *appsv1.Deployment

func SetInstrumentedApplicationContainer

func SetInstrumentedApplicationContainer(obj *odigosv1.InstrumentedApplication, envName *string, envValue *string, language common.ProgrammingLanguage) *odigosv1.InstrumentedApplication

func SetOdigosInstrumentationDisabled

func SetOdigosInstrumentationDisabled[W client.Object](obj W) W

func SetOdigosInstrumentationEnabled

func SetOdigosInstrumentationEnabled[W client.Object](obj W) W

func SetReportedNameAnnotation

func SetReportedNameAnnotation[W client.Object](obj W, reportedName string) W

Types

This section is empty.

Jump to

Keyboard shortcuts

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