test

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRadixBatch

func AddRadixBatch(radixClient versioned.Interface, jobName, componentName string, batchJobType kube.RadixBatchType, namespace string) *v1.RadixBatch

func CreateSecretForTest

func CreateSecretForTest(appName, secretName, jobName, radixJobComponentName, namespace string, kubeClient kubernetes.Interface)

func GetJobStatusByNameForTest

func GetJobStatusByNameForTest(jobs []modelsv1.JobStatus, name string) *modelsv1.JobStatus

func GetRadixBatchByNameForTest

func GetRadixBatchByNameForTest(radixBatches []v1.RadixBatch, jobName string) *v1.RadixBatch

func GetResponseBody added in v1.7.9

func GetResponseBody(response *http.Response, target interface{}) error

GetResponseBody Gets response payload as type

func GetSecretByNameForTest

func GetSecretByNameForTest(secrets []corev1.Secret, name string) *corev1.Secret

func ParseBatchAndJobNameFromScheduledJobName added in v1.7.9

func ParseBatchAndJobNameFromScheduledJobName(scheduleJobName string) (batchName, batchJobName string, ok bool)

func SetupTest added in v1.7.9

func SetupTest(appName, appEnvironment, appComponent, appDeployment string, historyLimit int) (versioned.Interface,
	kubernetes.Interface, prometheusclient.Interface, *kube.Kube)

Types

type ControllerTestUtils added in v1.7.9

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

func New added in v1.7.9

func New(controllers ...api.Controller) ControllerTestUtils

func (*ControllerTestUtils) ExecuteRequest added in v1.7.9

func (ctrl *ControllerTestUtils) ExecuteRequest(ctx context.Context, method, path string) <-chan *http.Response

ExecuteRequest Helper method to issue a http request

func (*ControllerTestUtils) ExecuteRequestWithBody added in v1.7.9

func (ctrl *ControllerTestUtils) ExecuteRequestWithBody(ctx context.Context, method, path string, body interface{}) <-chan *http.Response

ExecuteRequestWithBody Helper method to issue a http request with body

type RequestContextMatcher added in v1.8.0

type RequestContextMatcher struct {
}

func (RequestContextMatcher) Matches added in v1.8.0

func (c RequestContextMatcher) Matches(x interface{}) bool

func (RequestContextMatcher) String added in v1.8.0

func (c RequestContextMatcher) String() string

type TestParams added in v1.7.9

type TestParams struct {
	AppName                      string
	Environment                  string
	Namespace                    string
	JobComponentName             string
	DeploymentName               string
	JobName                      string
	RadixConfigEnvVarsMap        map[string]string
	EnvVarsConfigMapData         map[string]string
	EnvVarsMetadataConfigMapData map[string]string
}

func GetTestParams added in v1.7.9

func GetTestParams() *TestParams

func (*TestParams) ApplyRd added in v1.7.9

func (params *TestParams) ApplyRd(kubeUtil *kube.Kube) *v1.RadixDeployment

func (*TestParams) WithEnvVarsConfigMapData added in v1.7.9

func (params *TestParams) WithEnvVarsConfigMapData(envVars map[string]string) *TestParams

func (*TestParams) WithEnvVarsMetadataConfigMapData added in v1.7.9

func (params *TestParams) WithEnvVarsMetadataConfigMapData(envVars map[string]string) *TestParams

func (*TestParams) WithRadixConfigEnvVarsMap added in v1.7.9

func (params *TestParams) WithRadixConfigEnvVarsMap(envVars map[string]string) *TestParams

Jump to

Keyboard shortcuts

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