Documentation ¶
Index ¶
- Constants
- Variables
- func CreateObjects(ctx *builder.IntegrationTestContext, objs ...client.Object)
- func DeleteObjects(ctx *builder.IntegrationTestContext, objs ...client.Object)
- func EnsureClusterAviLabelExists(ctx *builder.IntegrationTestContext, key client.ObjectKey, label string, ...)
- func EnsureClusterAviLabelMatchExpectation(ctx *builder.IntegrationTestContext, key client.ObjectKey, ...)
- func EnsureRuntimeObjectMatchExpectation(ctx *builder.IntegrationTestContext, objKey client.ObjectKey, ...)
- func FindModuleDir(module string) string
- func GetCustomizedADC(labels map[string]string) *akoov1alpha1.AKODeploymentConfig
- func GetDefaultADC() *akoov1alpha1.AKODeploymentConfig
- func GetDefaultCluster() *clusterv1.Cluster
- func GetManagementADC() *akoov1alpha1.AKODeploymentConfig
- func GetManagementCluster() *clusterv1.Cluster
- func RandomString(n int) string
- func UpdateObjectLabels(ctx *builder.IntegrationTestContext, key client.ObjectKey, ...)
- func UpdateObjectsStatus(ctx *builder.IntegrationTestContext, objs ...client.Object)
- type ExpectResult
Constants ¶
View Source
const (
// CharSet defines the alphanumeric set for random string generation.
CharSet = "0123456789abcdefghijklmnopqrstuvwxyz"
)
Variables ¶
View Source
var ( // CustomizedADCLabels defines a common selector used for testing CustomizedADCLabels = map[string]string{"test": "true"} )
View Source
var DefaultAkoDeploymentConfigCommonSpec = akoov1alpha1.AKODeploymentConfigSpec{ DataNetwork: akoov1alpha1.DataNetwork{ Name: "integration-test-8ed12g", CIDR: "10.0.0.0/24", IPPools: []akoov1alpha1.IPPool{ { Start: "10.0.0.1", End: "10.0.0.10", Type: "V4", }, }, }, ControlPlaneNetwork: akoov1alpha1.ControlPlaneNetwork{ Name: "integration-test-8ed12g", CIDR: "10.1.0.0/24", }, ServiceEngineGroup: "ha-test", AdminCredentialRef: &akoov1alpha1.SecretRef{ Name: "controller-credentials", Namespace: "default", }, CertificateAuthorityRef: &akoov1alpha1.SecretRef{ Name: "controller-ca", Namespace: "default", }, }
View Source
var DefaultCluster = clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: "integration-test", Namespace: "default", }, Spec: clusterv1.ClusterSpec{}, }
Functions ¶
func CreateObjects ¶
func CreateObjects(ctx *builder.IntegrationTestContext, objs ...client.Object)
func DeleteObjects ¶
func DeleteObjects(ctx *builder.IntegrationTestContext, objs ...client.Object)
func EnsureClusterAviLabelMatchExpectation ¶
func EnsureClusterAviLabelMatchExpectation(ctx *builder.IntegrationTestContext, key client.ObjectKey, label, expectVal string)
func EnsureRuntimeObjectMatchExpectation ¶
func EnsureRuntimeObjectMatchExpectation(ctx *builder.IntegrationTestContext, objKey client.ObjectKey, obj client.Object, expectResult ExpectResult)
func FindModuleDir ¶
FindModuleDir returns the on-disk directory for the provided Go module.
func GetCustomizedADC ¶
func GetCustomizedADC(labels map[string]string) *akoov1alpha1.AKODeploymentConfig
GetCustomizedADC returns a pointer to a customized ADC for testing with specified cluster selector labels
func GetDefaultADC ¶
func GetDefaultADC() *akoov1alpha1.AKODeploymentConfig
GetDefaultADC returns a pointer to install-ako-for-all ADC for testing it has empty cluster selector to match all clusters
func GetDefaultCluster ¶
func GetManagementADC ¶
func GetManagementADC() *akoov1alpha1.AKODeploymentConfig
GetManagementADC returns a pointer to install-ako-for-management-cluster ADC for testing it always selects cluster labelled as {"cluster-role.tkg.tanzu.vmware.com/management": ""}
func GetManagementCluster ¶
func RandomString ¶
RandomString returns a random alphanumeric string.
func UpdateObjectLabels ¶
func UpdateObjectsStatus ¶
func UpdateObjectsStatus(ctx *builder.IntegrationTestContext, objs ...client.Object)
Types ¶
type ExpectResult ¶
type ExpectResult int
const ( EXIST ExpectResult = 0 NOTFOUND ExpectResult = 1 ERROR ExpectResult = 2 )
Click to show internal directories.
Click to hide internal directories.