Documentation ¶
Index ¶
- func AddRadixBatch(radixClient versioned.Interface, jobName, componentName string, ...) *v1.RadixBatch
- func CreateSecretForTest(appName, secretName, jobName, radixJobComponentName, namespace string, ...)
- func GetJobStatusByNameForTest(jobs []modelsv1.JobStatus, name string) *modelsv1.JobStatus
- func GetRadixBatchByNameForTest(radixBatches []v1.RadixBatch, jobName string) *v1.RadixBatch
- func GetResponseBody(response *http.Response, target interface{}) error
- func GetSecretByNameForTest(secrets []corev1.Secret, name string) *corev1.Secret
- func ParseBatchAndJobNameFromScheduledJobName(scheduleJobName string) (batchName, batchJobName string, ok bool)
- func SetupTest(appName, appEnvironment, appComponent, appDeployment string, historyLimit int) (versioned.Interface, kubernetes.Interface, prometheusclient.Interface, ...)
- type ControllerTestUtils
- type RequestContextMatcher
- type TestParams
- func (params *TestParams) ApplyRd(kubeUtil *kube.Kube) *v1.RadixDeployment
- func (params *TestParams) WithEnvVarsConfigMapData(envVars map[string]string) *TestParams
- func (params *TestParams) WithEnvVarsMetadataConfigMapData(envVars map[string]string) *TestParams
- func (params *TestParams) WithRadixConfigEnvVarsMap(envVars map[string]string) *TestParams
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 GetRadixBatchByNameForTest ¶
func GetRadixBatchByNameForTest(radixBatches []v1.RadixBatch, jobName string) *v1.RadixBatch
func GetResponseBody ¶ added in v1.7.9
GetResponseBody Gets response payload as type
func GetSecretByNameForTest ¶
func ParseBatchAndJobNameFromScheduledJobName ¶ added in v1.7.9
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
Click to show internal directories.
Click to hide internal directories.