testutil

package
v0.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertCondition

func AssertCondition(t *testing.T, conditions []metav1.Condition, condType string, status metav1.ConditionStatus, reason string)

AssertCondition fails the test if the condition doesn't exist or doesn't match expected values

func AssertConditionExists

func AssertConditionExists(t *testing.T, conditions []metav1.Condition, condType string)

AssertConditionExists fails the test if the condition doesn't exist

func AssertConditionMessage

func AssertConditionMessage(t *testing.T, conditions []metav1.Condition, condType string, messageSubstring string)

AssertConditionMessage fails the test if the condition message doesn't contain the expected substring

func AssertConditionNotExists

func AssertConditionNotExists(t *testing.T, conditions []metav1.Condition, condType string)

AssertConditionNotExists fails the test if the condition exists

func GetCondition

func GetCondition(conditions []metav1.Condition, condType string) *metav1.Condition

GetCondition finds a condition by type, returns nil if not found

func HasCondition

func HasCondition(conditions []metav1.Condition, condType string, status metav1.ConditionStatus) bool

HasCondition checks if a condition exists with the given type and status

func NewArtifact

func NewArtifact(opts ...ArtifactOption) *aimv1alpha1.AIMArtifact

func NewModel

func NewModel(opts ...ModelOption) *aimv1alpha1.AIMModel

func NewPVC

func NewPVC(opts ...PVCOption) *corev1.PersistentVolumeClaim

func NewRuntimeConfig

func NewRuntimeConfig(opts ...RuntimeConfigOption) *aimv1alpha1.AIMRuntimeConfig

func NewService

func NewService(opts ...ServiceOption) *aimv1alpha1.AIMService

func NewTemplate

func NewTemplate(opts ...TemplateOption) *aimv1alpha1.AIMServiceTemplate

func NewTemplateCache

func NewTemplateCache(opts ...TemplateCacheOption) *aimv1alpha1.AIMTemplateCache

Types

type ArtifactOption

type ArtifactOption func(*aimv1alpha1.AIMArtifact)

func WithArtifactName

func WithArtifactName(name string) ArtifactOption

func WithArtifactNamespace

func WithArtifactNamespace(namespace string) ArtifactOption

func WithArtifactSourceURI

func WithArtifactSourceURI(uri string) ArtifactOption

func WithArtifactStatus

func WithArtifactStatus(status constants.AIMStatus) ArtifactOption

type ModelOption

type ModelOption func(*aimv1alpha1.AIMModel)

func WithModelImage

func WithModelImage(image string) ModelOption

func WithModelMetadata

func WithModelMetadata(metadata *aimv1alpha1.ImageMetadata) ModelOption

func WithModelName

func WithModelName(name string) ModelOption

func WithModelNamespace

func WithModelNamespace(namespace string) ModelOption

func WithModelStatus

func WithModelStatus(status constants.AIMStatus) ModelOption

type PVCOption

type PVCOption func(*corev1.PersistentVolumeClaim)

func WithPVCName

func WithPVCName(name string) PVCOption

func WithPVCNamespace

func WithPVCNamespace(namespace string) PVCOption

type RuntimeConfigOption

type RuntimeConfigOption func(*aimv1alpha1.AIMRuntimeConfig)

func WithRuntimeConfigName

func WithRuntimeConfigName(name string) RuntimeConfigOption

func WithRuntimeConfigNamespace

func WithRuntimeConfigNamespace(namespace string) RuntimeConfigOption

type ServiceOption

type ServiceOption func(*aimv1alpha1.AIMService)

func WithServiceModelRef

func WithServiceModelRef(modelRef string) ServiceOption

func WithServiceName

func WithServiceName(name string) ServiceOption

func WithServiceNamespace

func WithServiceNamespace(namespace string) ServiceOption

func WithServiceStatus

func WithServiceStatus(status constants.AIMStatus) ServiceOption

func WithServiceTemplate

func WithServiceTemplate(templateName string) ServiceOption

type TemplateCacheOption

type TemplateCacheOption func(*aimv1alpha1.AIMTemplateCache)

func WithTemplateCacheName

func WithTemplateCacheName(name string) TemplateCacheOption

func WithTemplateCacheNamespace

func WithTemplateCacheNamespace(namespace string) TemplateCacheOption

func WithTemplateCacheStatus

func WithTemplateCacheStatus(status constants.AIMStatus) TemplateCacheOption

func WithTemplateCacheTemplate

func WithTemplateCacheTemplate(templateName string) TemplateCacheOption

type TemplateOption

type TemplateOption func(*aimv1alpha1.AIMServiceTemplate)

func WithTemplateModelName

func WithTemplateModelName(modelName string) TemplateOption

func WithTemplateModelSources

func WithTemplateModelSources(sources []aimv1alpha1.AIMModelSource) TemplateOption

func WithTemplateName

func WithTemplateName(name string) TemplateOption

func WithTemplateNamespace

func WithTemplateNamespace(namespace string) TemplateOption

func WithTemplateStatus

func WithTemplateStatus(status constants.AIMStatus) TemplateOption

Jump to

Keyboard shortcuts

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