test

package
v0.0.0-...-7491591 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 39 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SonataFlowGreetingsWithDataInputSchemaCR = "sonataflow.org_v1alpha08_sonataflow_greetings_datainput.yaml"
	SonataFlowGreetingsWithStaticResourcesCR = "sonataflow.org_v1alpha08_sonataflow-metainf.yaml"
	SonataFlowSimpleOpsYamlCR                = "sonataflow.org_v1alpha08_sonataflow-simpleops.yaml"
	SonataFlowVetWithEventCR                 = "sonataflow.org_v1alpha08_sonataflow_vet_event.yaml"
	SonataFlowGreetingsDataInputSchemaConfig = "v1_configmap_greetings_datainput.yaml"
	SonataFlowGreetingsStaticFilesConfig     = "v1_configmap_greetings_staticfiles.yaml"
)

Variables

This section is empty.

Functions

func CreateFakeKnativeDiscoveryClient

func CreateFakeKnativeDiscoveryClient() discovery.DiscoveryInterface

func GetBaseClusterPlatformInReadyPhase

func GetBaseClusterPlatformInReadyPhase(namespace string) *operatorapi.SonataFlowClusterPlatform

func GetBasePlatform

func GetBasePlatform() *operatorapi.SonataFlowPlatform

func GetBasePlatformInReadyPhase

func GetBasePlatformInReadyPhase(namespace string) *operatorapi.SonataFlowPlatform

func GetBasePlatformWithBaseImageInReadyPhase

func GetBasePlatformWithBaseImageInReadyPhase(namespace string) *operatorapi.SonataFlowPlatform

func GetBasePlatformWithBroker

func GetBasePlatformWithBroker() *operatorapi.SonataFlowPlatform

func GetBasePlatformWithBrokerInReadyPhase

func GetBasePlatformWithBrokerInReadyPhase(namespace string) *operatorapi.SonataFlowPlatform

func GetBasePlatformWithDevBaseImageInReadyPhase

func GetBasePlatformWithDevBaseImageInReadyPhase(namespace string) *operatorapi.SonataFlowPlatform

func GetBaseSonataFlow

func GetBaseSonataFlow(namespace string) *operatorapi.SonataFlow

func GetBaseSonataFlowWithDevProfile

func GetBaseSonataFlowWithDevProfile(namespace string) *operatorapi.SonataFlow

func GetBaseSonataFlowWithGitopsProfile

func GetBaseSonataFlowWithGitopsProfile(namespace string) *operatorapi.SonataFlow

func GetBaseSonataFlowWithPreviewProfile

func GetBaseSonataFlowWithPreviewProfile(namespace string) *operatorapi.SonataFlow

GetBaseSonataFlowWithPreviewProfile gets a base workflow that has a pre-built image set in podTemplate.

func GetBaseSonataFlowWithProdProfile

func GetBaseSonataFlowWithProdProfile(namespace string) *operatorapi.SonataFlow

func GetDefaultBroker

func GetDefaultBroker(namespace string) *eventingv1.Broker

func GetKubernetesResource

func GetKubernetesResource(testFile string, resource client.Object)

func GetLocalSucceedSonataFlowBuild

func GetLocalSucceedSonataFlowBuild(name, namespace string) *operatorapi.SonataFlowBuild

GetLocalSucceedSonataFlowBuild gets a local (testdata dir ref to caller) SonataFlowBuild with Succeed status equals to true.

func GetNewEmptySonataFlowBuild

func GetNewEmptySonataFlowBuild(name, namespace string) *operatorapi.SonataFlowBuild

func GetPlatformMinikubeE2eTest

func GetPlatformMinikubeE2eTest() string

func GetPlatformOpenshiftE2eTest

func GetPlatformOpenshiftE2eTest() string

func GetPostgresFolder

func GetPostgresFolder() string

func GetSFPlatformWithDIandJSUsingPostgres

func GetSFPlatformWithDIandJSUsingPostgres() string

func GetSonataFlow

func GetSonataFlow(testFile, namespace string) *operatorapi.SonataFlow

func GetSonataFlowBuilderConfig

func GetSonataFlowBuilderConfig(namespace string) *corev1.ConfigMap

func GetSonataFlowClusterPlatformInReadyPhase

func GetSonataFlowClusterPlatformInReadyPhase(path string, namespace string) *operatorapi.SonataFlowClusterPlatform

func GetSonataFlowE2EPlatformNoServicesDirectory

func GetSonataFlowE2EPlatformNoServicesDirectory() string

func GetSonataFlowE2EPlatformPersistenceSampleDataDirectory

func GetSonataFlowE2EPlatformPersistenceSampleDataDirectory(subdir string) string

func GetSonataFlowE2EPlatformServicesDirectory

func GetSonataFlowE2EPlatformServicesDirectory() string

func GetSonataFlowE2EPlatformServicesKnativeDirectory

func GetSonataFlowE2EPlatformServicesKnativeDirectory(subdir string) string

func GetSonataFlowE2EWorkflowPersistenceSampleDataDirectory

func GetSonataFlowE2EWorkflowPersistenceSampleDataDirectory(subdir string) string

func GetSonataFlowE2eCallbackstateTimeoutsFolder

func GetSonataFlowE2eCallbackstateTimeoutsFolder() string

func GetSonataFlowE2eGreetingFolder

func GetSonataFlowE2eGreetingFolder() string

func GetSonataFlowE2eOrderProcessingFolder

func GetSonataFlowE2eOrderProcessingFolder() string

func GetSonataFlowE2eVetFolder

func GetSonataFlowE2eVetFolder() string

func GetSonataFlowPlatformInReadyPhase

func GetSonataFlowPlatformInReadyPhase(path string, namespace string) *operatorapi.SonataFlowPlatform

func GetVetEventSonataFlow

func GetVetEventSonataFlow(namespace string) *operatorapi.SonataFlow

func MustGetConfigMap

func MustGetConfigMap(t *testing.T, client ctrl.WithWatch, workflow *operatorapi.SonataFlow) *v1.ConfigMap

func MustGetDeployment

func MustGetDeployment(t *testing.T, client ctrl.WithWatch, workflow *operatorapi.SonataFlow) *appsv1.Deployment

func MustGetService

func MustGetService(t *testing.T, client ctrl.WithWatch, workflow *operatorapi.SonataFlow) *v1.Service

func MustGetWorkflow

func MustGetWorkflow(t *testing.T, client ctrl.WithWatch, name types.NamespacedName) *operatorapi.SonataFlow

func NewFakeRecorder

func NewFakeRecorder() record.EventRecorder

func NewSonataFlow

func NewSonataFlow(filePath string, namespace string, options ...func(*operatorapi.SonataFlow)) *operatorapi.SonataFlow

func SetDevProfile

func SetDevProfile(workflow *operatorapi.SonataFlow)

func SetGitopsProfile

func SetGitopsProfile(workflow *operatorapi.SonataFlow)

func SetPreviewProfile

func SetPreviewProfile(workflow *operatorapi.SonataFlow)

Types

type MockPlatformService

type MockPlatformService struct {
	Client clientv1.Client

	CreateFunc      func(ctx context.Context, obj clientv1.Object, opts ...clientv1.CreateOption) error
	DeleteFunc      func(ctx context.Context, obj clientv1.Object, opts ...clientv1.DeleteOption) error
	GetFunc         func(ctx context.Context, key clientv1.ObjectKey, obj clientv1.Object) error
	ListFunc        func(ctx context.Context, list clientv1.ObjectList, opts ...clientv1.ListOption) error
	UpdateFunc      func(ctx context.Context, obj clientv1.Object, opts ...clientv1.UpdateOption) error
	PatchFunc       func(ctx context.Context, obj clientv1.Object, patch clientv1.Patch, opts ...clientv1.PatchOption) error
	DeleteAllOfFunc func(ctx context.Context, obj clientv1.Object, opts ...clientv1.DeleteAllOfOption) error
	GetCachedFunc   func(ctx context.Context, key clientv1.ObjectKey, obj clientv1.Object) error
	GetSchemeFunc   func() *runtime.Scheme
	StatusFunc      func() clientv1.StatusWriter
	// contains filtered or unexported fields
}

func (*MockPlatformService) Create

func (service *MockPlatformService) Create(ctx context.Context, obj clientv1.Object, opts ...clientv1.CreateOption) error

func (*MockPlatformService) Delete

func (service *MockPlatformService) Delete(ctx context.Context, obj clientv1.Object, opts ...clientv1.DeleteOption) error

func (*MockPlatformService) DeleteAllOf

func (service *MockPlatformService) DeleteAllOf(ctx context.Context, obj clientv1.Object, opts ...clientv1.DeleteAllOfOption) error

func (*MockPlatformService) Get

func (*MockPlatformService) GetCached

func (service *MockPlatformService) GetCached(ctx context.Context, key clientv1.ObjectKey, obj clientv1.Object) error

func (*MockPlatformService) GetScheme

func (service *MockPlatformService) GetScheme() *runtime.Scheme

func (*MockPlatformService) IsMockService

func (service *MockPlatformService) IsMockService() bool

func (*MockPlatformService) List

func (service *MockPlatformService) List(ctx context.Context, list clientv1.ObjectList, opts ...clientv1.ListOption) error

func (*MockPlatformService) Patch

func (service *MockPlatformService) Patch(ctx context.Context, obj clientv1.Object, patch clientv1.Patch, opts ...clientv1.PatchOption) error

func (*MockPlatformService) Status

func (service *MockPlatformService) Status() clientv1.StatusWriter

func (*MockPlatformService) Update

func (service *MockPlatformService) Update(ctx context.Context, obj clientv1.Object, opts ...clientv1.UpdateOption) error

type SonataFlowClientBuilder

type SonataFlowClientBuilder struct {
	// contains filtered or unexported fields
}

func NewKogitoClientBuilderWithOpenShift

func NewKogitoClientBuilderWithOpenShift() *SonataFlowClientBuilder

NewKogitoClientBuilderWithOpenShift creates a new fake client with OpenShift schemas. If your object is not present, just add in the list below.

func NewSonataFlowClientBuilder

func NewSonataFlowClientBuilder() *SonataFlowClientBuilder

NewSonataFlowClientBuilder creates a new fake.ClientBuilder with the right scheme references

func NewSonataFlowClientBuilderWithKnative

func NewSonataFlowClientBuilderWithKnative() *SonataFlowClientBuilder

func (*SonataFlowClientBuilder) Build

Build from the underlying fake.ClientBuilder. To overwrite this method we need to forward all the functions from the base implementation since they do not use an interface.

func (*SonataFlowClientBuilder) WithRuntimeObjects

func (s *SonataFlowClientBuilder) WithRuntimeObjects(initRuntimeObjs ...runtime.Object) *SonataFlowClientBuilder

func (*SonataFlowClientBuilder) WithStatusSubresource

func (s *SonataFlowClientBuilder) WithStatusSubresource(o ...ctrl.Object) *SonataFlowClientBuilder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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