e2ebehavior

package
v0.0.0-...-a834cfb Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: UPL-1.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Describe      = ginkgo.Describe
	By            = ginkgo.By
	GinkgoWriter  = ginkgo.GinkgoWriter
	Expect        = gomega.Expect
	BeNil         = gomega.BeNil
	Eventually    = gomega.Eventually
	Equal         = gomega.Equal
	Succeed       = gomega.Succeed
	HaveOccurred  = gomega.HaveOccurred
	BeNumerically = gomega.BeNumerically
	BeTrue        = gomega.BeTrue
)

Functions

func AssertACDBind

func AssertACDBind(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName, state database.AutonomousContainerDatabaseLifecycleStateEnum) func()

func AssertACDLocalDelete

func AssertACDLocalDelete(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName) func()

func AssertACDLocalState

func AssertACDLocalState(k8sClient *client.Client, acdLookupKey *types.NamespacedName, state database.AutonomousContainerDatabaseLifecycleStateEnum, timeout time.Duration) func()

func AssertACDRemoteState

func AssertACDRemoteState(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName, state database.AutonomousContainerDatabaseLifecycleStateEnum, timeout time.Duration) func()

func AssertACDRemoteStateOCID

func AssertACDRemoteStateOCID(k8sClient *client.Client, dbClient *database.DatabaseClient, acdID *string, state database.AutonomousContainerDatabaseLifecycleStateEnum, timeout time.Duration) func()

func AssertACDRestart

func AssertACDRestart(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName) func()

func AssertACDSpec

func AssertACDSpec(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName, expectedACD *dbv1alpha1.AutonomousContainerDatabase) func()

func AssertACDState

func AssertACDState(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName, state database.AutonomousContainerDatabaseLifecycleStateEnum, timeout time.Duration) func()

func AssertACDTerminate

func AssertACDTerminate(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName) func()

func AssertADBDetails

func AssertADBDetails(k8sClient *client.Client,
	dbClient *database.DatabaseClient,
	adbLookupKey *types.NamespacedName,
	expectedADB *dbv1alpha1.AutonomousDatabase) func()

AssertADBDetails asserts the changes in spec.details

func AssertADBLocalState

func AssertADBLocalState(k8sClient *client.Client, adbLookupKey *types.NamespacedName, state database.AutonomousDatabaseLifecycleStateEnum) func()

AssertADBLocalState asserts the lifecycle state of the local resource using adbLookupKey

func AssertADBRemoteState

func AssertADBRemoteState(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, state database.AutonomousDatabaseLifecycleStateEnum) func()

func AssertADBRemoteStateForBackupRestore

func AssertADBRemoteStateForBackupRestore(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, state database.AutonomousDatabaseLifecycleStateEnum) func()

Backup takes ~15 minutes to complete, this function waits 20 minutes until ADB state is AVAILABLE

func AssertADBRemoteStateOCID

func AssertADBRemoteStateOCID(k8sClient *client.Client, dbClient *database.DatabaseClient, adbID *string, state database.AutonomousDatabaseLifecycleStateEnum, timeout time.Duration) func()

func AssertADBState

func AssertADBState(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, state database.AutonomousDatabaseLifecycleStateEnum) func()

AssertADBState asserts local and remote state

func AssertAdminPassword

func AssertAdminPassword(dbClient *database.DatabaseClient, databaseOCID *string, tnsEntry *string, adminPassword *string, walletPassword *string) error

Runs a script that connects to an ADB

func AssertBackupRestore

func AssertBackupRestore(k8sClient *client.Client, dbClient *database.DatabaseClient, backupRestoreLookupKey *types.NamespacedName, adbLookupKey *types.NamespacedName, state database.AutonomousDatabaseLifecycleStateEnum) func()

func AssertBind

func AssertBind(k8sClient *client.Client, adbLookupKey *types.NamespacedName) func()

func AssertHardLinkDelete

func AssertHardLinkDelete(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName) func()

AssertHardLinkDelete asserts the database is terminated in OCI when hardLink is set to true

func AssertProvision

func AssertProvision(k8sClient *client.Client, adbLookupKey *types.NamespacedName) func()

func AssertSoftLinkDelete

func AssertSoftLinkDelete(k8sClient *client.Client, adbLookupKey *types.NamespacedName) func()

AssertSoftLinkDelete asserts the database remains in OCI when hardLink is set to false

func AssertWallet

func AssertWallet(k8sClient *client.Client, adbLookupKey *types.NamespacedName) func()

func ConfigureADBBackup

func ConfigureADBBackup(dbClient *database.DatabaseClient, databaseOCID *string, tnsEntry *string, adminPassword *string, walletPassword *string, bucket *string, authToken *string, ociUser *string) error

Runs a script that connects to an ADB and configures the backup bucket

func TestNetworkAccess

func TestNetworkAccess(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, networkSpec dbv1alpha1.NetworkAccessSpec) func()

func TestNetworkAccessPrivate

func TestNetworkAccessPrivate(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, isMTLSConnectionRequired bool, subnetOCID *string, nsgOCIDs *string) func()

func TestNetworkAccessPublic

func TestNetworkAccessPublic(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName) func()

func TestNetworkAccessRestricted

func TestNetworkAccessRestricted(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, isMTLSConnectionRequired bool) func()

func UpdateACDSpec

func UpdateACDSpec(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName) func() *dbv1alpha1.AutonomousContainerDatabase

func UpdateAndAssertACDSpec

func UpdateAndAssertACDSpec(k8sClient *client.Client, dbClient *database.DatabaseClient, acdLookupKey *types.NamespacedName) func()

func UpdateAndAssertADBState

func UpdateAndAssertADBState(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, state database.AutonomousDatabaseLifecycleStateEnum) func()

UpdateAndAssertADBState updates adb state and then asserts if change is propagated to OCI

func UpdateAndAssertDetails

func UpdateAndAssertDetails(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, newSecretName string, newAdminPassword *string, walletPassword *string) func()

UpdateAndAssertDetails changes the below fields: displayName: "bar" -> "bar_new" adminPassword: "foo" -> "foo_new", cpuCoreCount: from 1 to 2, or from 2 to 1

func UpdateDetails

func UpdateDetails(k8sClient *client.Client, dbClient *database.DatabaseClient, adbLookupKey *types.NamespacedName, newSecretName string, newAdminPassword *string) func() *dbv1alpha1.AutonomousDatabase

UpdateDetails updates spec.details from local resource and OCI

func UpdateState

func UpdateState(k8sClient *client.Client, adbLookupKey *types.NamespacedName, state database.AutonomousDatabaseLifecycleStateEnum) func()

UpdateState updates state from local resource and OCI

Types

This section is empty.

Jump to

Keyboard shortcuts

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