automation

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func CreateTypeFromPath(theType any, path string) (err error)

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

type SetupPaths

type SetupPaths struct {
	DbPath        string
	DbSecretPath  string
	NdbSecretPath string
	AppPodPath    string
	AppSvcPath    string
}

Used in TestSuites to create resource objects

Directories

Path Synopsis
clientset

Jump to

Keyboard shortcuts

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