Documentation ¶
Index ¶
- func CheckRequiredEnv(ctx context.Context) (err error)
- func CheckTmInfo(ctx context.Context, database *ndbv1alpha1.Database, ...) (err error)
- func CreateTypeFromPath(theType any, path string) (err error)
- func GetLogger(ctx context.Context) *log.Logger
- func SetupContext(ctx context.Context, logger *log.Logger) context.Context
- func SetupKubeconfig(ctx context.Context) (config *rest.Config, err error)
- func SetupLogger(path string, rootName string) (*log.Logger, error)
- func SetupSchemeAndClientSet(ctx context.Context, config *rest.Config) (v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, ...)
- type CloningTestSuiteManager
- func (cm *CloningTestSuiteManager) GetAppResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (res http.Response, err error)
- func (cm *CloningTestSuiteManager) GetDatabaseOrCloneResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (databaseResponse *ndb_api.DatabaseResponse, err error)
- func (dm *CloningTestSuiteManager) GetTimemachineResponseByDatabaseId(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (timemachineResponse *ndb_api.TimeMachineResponse, err error)
- func (cm *CloningTestSuiteManager) Setup(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (err error)
- func (cm *CloningTestSuiteManager) TearDown(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (err error)
- type ProvisioningTestSuiteManager
- func (pm *ProvisioningTestSuiteManager) GetAppResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (res http.Response, err error)
- func (pm *ProvisioningTestSuiteManager) GetDatabaseOrCloneResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (databaseResponse *ndb_api.DatabaseResponse, err error)
- func (pm *ProvisioningTestSuiteManager) GetTimemachineResponseByDatabaseId(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (timemachineResponse *ndb_api.TimeMachineResponse, err error)
- func (pm *ProvisioningTestSuiteManager) Setup(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (err error)
- func (pm *ProvisioningTestSuiteManager) TearDown(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, ...) (err error)
- type SetupTypes
- type TestSuiteManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRequiredEnv ¶ added in v0.5.1
Check if required environment variables are present
func CheckTmInfo ¶ added in v0.5.1
func CheckTmInfo(ctx context.Context, database *ndbv1alpha1.Database, tmResponse *ndb_api.TimeMachineResponse) (err error)
Checking that TM info that was specified in yaml is returned in TM response
func CreateTypeFromPath ¶
CreateTypeFromPath reads a file path, converts it to json, and unmarshals json to a pointer. Ensure that theType is a pointer.
func SetupContext ¶
Setup up Context with Logger
func SetupKubeconfig ¶
Setup kubeconfig
func SetupLogger ¶
Setup a logger with a unique file path
func SetupSchemeAndClientSet ¶
func SetupSchemeAndClientSet(ctx context.Context, config *rest.Config) (v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, clientset *kubernetes.Clientset, err error)
Setup scheme and clientsets
Types ¶
type CloningTestSuiteManager ¶ added in v0.5.1
type CloningTestSuiteManager struct{}
func (*CloningTestSuiteManager) GetAppResponse ¶ added in v0.5.1
func (cm *CloningTestSuiteManager) GetAppResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, localPort string) (res http.Response, err error)
func (*CloningTestSuiteManager) GetDatabaseOrCloneResponse ¶ added in v0.5.1
func (cm *CloningTestSuiteManager) GetDatabaseOrCloneResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client) (databaseResponse *ndb_api.DatabaseResponse, err error)
func (*CloningTestSuiteManager) GetTimemachineResponseByDatabaseId ¶ added in v0.5.1
func (dm *CloningTestSuiteManager) GetTimemachineResponseByDatabaseId(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client) (timemachineResponse *ndb_api.TimeMachineResponse, err error)
EMPTY STUB
func (*CloningTestSuiteManager) Setup ¶ added in v0.5.1
func (cm *CloningTestSuiteManager) Setup(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error)
func (*CloningTestSuiteManager) TearDown ¶ added in v0.5.1
func (cm *CloningTestSuiteManager) TearDown(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error)
type ProvisioningTestSuiteManager ¶ added in v0.5.1
type ProvisioningTestSuiteManager struct{}
func (*ProvisioningTestSuiteManager) GetAppResponse ¶ added in v0.5.1
func (pm *ProvisioningTestSuiteManager) GetAppResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, localPort string) (res http.Response, err error)
func (*ProvisioningTestSuiteManager) GetDatabaseOrCloneResponse ¶ added in v0.5.1
func (pm *ProvisioningTestSuiteManager) GetDatabaseOrCloneResponse(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client) (databaseResponse *ndb_api.DatabaseResponse, err error)
func (*ProvisioningTestSuiteManager) GetTimemachineResponseByDatabaseId ¶ added in v0.5.1
func (pm *ProvisioningTestSuiteManager) GetTimemachineResponseByDatabaseId(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client) (timemachineResponse *ndb_api.TimeMachineResponse, err error)
Tests TM Response
func (*ProvisioningTestSuiteManager) Setup ¶ added in v0.5.1
func (pm *ProvisioningTestSuiteManager) Setup(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error)
func (*ProvisioningTestSuiteManager) TearDown ¶ added in v0.5.1
func (pm *ProvisioningTestSuiteManager) TearDown(ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error)
type SetupTypes ¶
type SetupTypes struct { NdbServer *ndbv1alpha1.NDBServer Database *ndbv1alpha1.Database NdbSecret *corev1.Secret DbSecret *corev1.Secret AppPod *corev1.Pod }
YAML Resource types
func SetupTypeTemplates ¶
func SetupTypeTemplates(ctx context.Context) (setupTypes *SetupTypes, err error)
Setup yaml types. Uses paths specified in automation.constants.go
type TestSuiteManager ¶ added in v0.5.1
type TestSuiteManager interface { Setup( ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error) TearDown( ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client, t *testing.T) (err error) GetDatabaseOrCloneResponse( ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client) (databaseResponse *ndb_api.DatabaseResponse, err error) GetAppResponse( ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, localPort string) (res http.Response, err error) GetTimemachineResponseByDatabaseId( ctx context.Context, st *SetupTypes, clientset *kubernetes.Clientset, v1alpha1ClientSet *clientsetv1alpha1.V1alpha1Client) (timemachineResponse *ndb_api.TimeMachineResponse, err error) }
func GetTestSuiteManager ¶ added in v0.5.1
func GetTestSuiteManager(ctx context.Context, st SetupTypes) (manager TestSuiteManager)
Click to show internal directories.
Click to hide internal directories.