Documentation
¶
Index ¶
- func CompareResources(actualDeployment *appsv1.Deployment, expected TestExpectedResources, ...)
- func EnableTestMode()
- func EnsureReconcile(t *testing.T, ctx *chetypes.DeployContext, ...)
- func FindVolume(volumes []corev1.Volume, name string) corev1.Volume
- func FindVolumeMount(volumes []corev1.VolumeMount, name string) corev1.VolumeMount
- func GetResourceQuantity(value string, defaultValue string) resource.Quantity
- func IsObjectExists(client client.Client, key types.NamespacedName, blueprint client.Object) bool
- func IsTestMode() bool
- func ValidateContainData(actualData map[string]string, expectedData map[string]string, t *testing.T)
- func ValidateSecurityContext(actualDeployment *appsv1.Deployment, t *testing.T)
- type DeployContextBuild
- type TestExpectedResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareResources ¶
func CompareResources(actualDeployment *appsv1.Deployment, expected TestExpectedResources, t *testing.T)
func EnableTestMode ¶
func EnableTestMode()
func EnsureReconcile ¶
func EnsureReconcile( t *testing.T, ctx *chetypes.DeployContext, testReconcileFunc func(ctx *chetypes.DeployContext) (result reconcile.Result, done bool, err error))
EnsureReconcile runs the testReconcileFunc until it returns done=true or 10 iterations
func FindVolumeMount ¶
func FindVolumeMount(volumes []corev1.VolumeMount, name string) corev1.VolumeMount
func GetResourceQuantity ¶
func IsObjectExists ¶
func IsTestMode ¶
func IsTestMode() bool
func ValidateContainData ¶
func ValidateSecurityContext ¶
func ValidateSecurityContext(actualDeployment *appsv1.Deployment, t *testing.T)
Types ¶
type DeployContextBuild ¶
type DeployContextBuild struct {
// contains filtered or unexported fields
}
func NewCtxBuilder ¶
func NewCtxBuilder() *DeployContextBuild
func (*DeployContextBuild) Build ¶
func (f *DeployContextBuild) Build() *chetypes.DeployContext
func (*DeployContextBuild) WithCheCluster ¶
func (f *DeployContextBuild) WithCheCluster(cheCluster *chev2.CheCluster) *DeployContextBuild
func (*DeployContextBuild) WithObjects ¶
func (f *DeployContextBuild) WithObjects(initObjs ...client.Object) *DeployContextBuild
Click to show internal directories.
Click to hide internal directories.