Documentation
¶
Index ¶
- Constants
- func CreateTypeFromPath(theType any, path string) (err error)
- func ProvisioningTestSetup(dbSecret, ndbSecret *corev1.Secret, database *ndbv1alpha1.Database, ...) (err error)
- func ProvisioningTestTeardown(dbSecret, ndbSecret *corev1.Secret, database *ndbv1alpha1.Database, ...) (err error)
- type SetupPaths
Constants ¶
View Source
const ( DATABASE_PATH = "./config/database.yaml" DB_SECRET_PATH = "./config/db-secret.yaml" NDB_SECRET_PATH = "./config/ndb-secret.yaml" APP_POD_PATH = "./config/pod.yaml" APP_SVC_PATH = "./config/service.yaml" )
Variables ¶
This section is empty.
Functions ¶
func CreateTypeFromPath ¶
CreateTypeFromPath reads a file path, converts it to json, and unmarshals json to a pointer. Ensure that theType is a pointer.
func ProvisioningTestSetup ¶
func ProvisioningTestSetup(dbSecret, ndbSecret *corev1.Secret, database *ndbv1alpha1.Database, appPod *corev1.Pod, appSvc *corev1.Service, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error)
This function is called from the SetupSuite() function of all testsuites. It loads environment variables, instantiate resources, waits for db to be ready, and pod to start.
func ProvisioningTestTeardown ¶
func ProvisioningTestTeardown(dbSecret, ndbSecret *corev1.Secret, database *ndbv1alpha1.Database, appPod *corev1.Pod, appSvc *corev1.Service, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error)
This function is called from the TeardownSuite() function of all testsuites. Delete resources and de-provision database.
Types ¶
Click to show internal directories.
Click to hide internal directories.