mongodbtests

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutomationConfigConfigMapExists

func AutomationConfigConfigMapExists(mdb *mdbv1.MongoDB) func(t *testing.T)

func BasicConnectivity

func BasicConnectivity(mdb *mdbv1.MongoDB) func(t *testing.T)

BasicConnectivity returns a test function which performs a basic MongoDB connectivity test

func Connect

func Connect(mdb *mdbv1.MongoDB) error

Connect performs a connectivity check by initializing a mongo client and inserting a document into the MongoDB resource

func CreateMongoDBResource

func CreateMongoDBResource(mdb *mdbv1.MongoDB, ctx *f.TestCtx) func(*testing.T)

CreateMongoDBResource creates the MongoDB resource

func DeletePod

func DeletePod(mdb *mdbv1.MongoDB, podNum int) func(*testing.T)

DeletePod will delete a pod that belongs to this MongoDB resource's StatefulSet

func IsReachableDuring

func IsReachableDuring(mdb *mdbv1.MongoDB, interval time.Duration, testFunc func()) func(*testing.T)

IsReachableDuring periodically tests connectivity to the provided MongoDB resource during execution of the provided functions. This function can be used to ensure The MongoDB is up throughout the test.

func MongoDBReachesRunningPhase

func MongoDBReachesRunningPhase(mdb *mdbv1.MongoDB) func(t *testing.T)

MongoDBReachesRunningPhase ensure the MongoDB resource reaches the Running phase

func Scale

func Scale(mdb *mdbv1.MongoDB, newMembers int) func(*testing.T)

Scale update the MongoDB with a new number of members and updates the resource

func StatefulSetIsReady

func StatefulSetIsReady(mdb *mdbv1.MongoDB) func(t *testing.T)

StatefulSetIsReady ensures that the underlying stateful set reaches the running state

func Status

func Status(mdb *mdbv1.MongoDB, expectedStatus mdbv1.MongoDBStatus) func(t *testing.T)

Status compares the given status to the actual status of the MongoDB resource

Types

This section is empty.

Jump to

Keyboard shortcuts

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