mongodbtests

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 22 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 AutomationConfigVersionHasTheExpectedVersion added in v0.0.7

func AutomationConfigVersionHasTheExpectedVersion(mdb *mdbv1.MongoDB, expectedVersion int) 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 BasicFunctionality added in v0.0.6

func BasicFunctionality(mdb *mdbv1.MongoDB) func(*testing.T)

func ChangeVersion added in v0.0.6

func ChangeVersion(mdb *mdbv1.MongoDB, newVersion string) func(*testing.T)

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 HasFeatureCompatibilityVersion added in v0.0.6

func HasFeatureCompatibilityVersion(mdb *mdbv1.MongoDB, fcv string, tries int) func(t *testing.T)

HasFeatureCompatibilityVersion verifies that the FeatureCompatibilityVersion is set to `version`. The FCV parameter is not signaled as a non Running state, for this reason, this function checks the value of the parameter many times, based on the value of `tries`.

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 StatefulSetHasOwnerReference added in v0.0.6

func StatefulSetHasOwnerReference(mdb *mdbv1.MongoDB, expectedOwnerReference metav1.OwnerReference) func(t *testing.T)

func StatefulSetHasUpdateStrategy added in v0.0.6

func StatefulSetHasUpdateStrategy(mdb *mdbv1.MongoDB, strategy appsv1.StatefulSetUpdateStrategyType) func(t *testing.T)

StatefulSetHasUpdateStrategy verifies that the StatefulSet holding this MongoDB resource has the correct Update Strategy

func StatefulSetIsReady

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

StatefulSetIsReady ensures that the underlying stateful set reaches the running state

func StatefulSetIsUpdated added in v0.0.6

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

StatefulSetIsUpdated ensures that all the Pods of the StatefulSet are in "Updated" condition.

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