test

package
v0.0.0-...-d267472 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareAccountsIgnore

func CompareAccountsIgnore() cmp.Option

func CompareEventsIgnore

func CompareEventsIgnore() cmp.Option

func NewDatabaseAccountName

func NewDatabaseAccountName() v1.PostgreSQLResourceName

NewDatabaseAccountName returns a newly generated database/username.

func ReconcileStatusDBUser

func ReconcileStatusDBUser(want *v1.DatabaseAccount)

func ReconcileWantDBFinalizer

func ReconcileWantDBFinalizer(want *v1.DatabaseAccount)

func ReconcileWantSecretDatabaseDSN

func ReconcileWantSecretDatabaseDSN(want *corev1.Secret)

func ReconcileWantSecretFinalizer

func ReconcileWantSecretFinalizer(want *corev1.Secret)

func ReconcileWantSecretInit

func ReconcileWantSecretInit(want *corev1.Secret)

func ReconcileWantSecretNamePassword

func ReconcileWantSecretNamePassword(want *corev1.Secret)

Types

type ControllerMockWrapper

type ControllerMockWrapper struct {
	Secret, OriginalSecret       *corev1.Secret
	DBAccount, OriginalDBAccount *v1.DatabaseAccount
	Client                       *v1test.MockClient
	// contains filtered or unexported fields
}

func NewControllerMockWrapper

func NewControllerMockWrapper(t *testing.T, start time.Time, client *v1test.MockClient) *ControllerMockWrapper

func (*ControllerMockWrapper) CallCount

func (c *ControllerMockWrapper) CallCount(name string) (int, bool)

func (*ControllerMockWrapper) CallCountMap

func (c *ControllerMockWrapper) CallCountMap() map[string]int

func (*ControllerMockWrapper) CallCountReset

func (c *ControllerMockWrapper) CallCountReset()

func (*ControllerMockWrapper) GetDatabaseAccount

func (c *ControllerMockWrapper) GetDatabaseAccount() v1.DatabaseAccount

func (*ControllerMockWrapper) GetDatabaseAccountNamespacedName

func (c *ControllerMockWrapper) GetDatabaseAccountNamespacedName() types.NamespacedName

func (*ControllerMockWrapper) GetDatabaseAccountOriginal

func (c *ControllerMockWrapper) GetDatabaseAccountOriginal() v1.DatabaseAccount

func (*ControllerMockWrapper) GetExpectDatabaseAccount

func (c *ControllerMockWrapper) GetExpectDatabaseAccount(ff ...ReconcileModDBFunc) v1.DatabaseAccount

func (*ControllerMockWrapper) GetExpectSecret

func (c *ControllerMockWrapper) GetExpectSecret(ff ...ReconcileModSecretFunc) corev1.Secret

func (*ControllerMockWrapper) GetSecret

func (c *ControllerMockWrapper) GetSecret() corev1.Secret

func (*ControllerMockWrapper) IncCallCount

func (c *ControllerMockWrapper) IncCallCount(name string)

func (*ControllerMockWrapper) Init

func (c *ControllerMockWrapper) Init()

func (*ControllerMockWrapper) InitDatabaseAccount

func (c *ControllerMockWrapper) InitDatabaseAccount(f func(dba *v1.DatabaseAccount))

func (*ControllerMockWrapper) InitSecrets

func (c *ControllerMockWrapper) InitSecrets(f func(secret *corev1.Secret))

type ReconcileModDBFunc

type ReconcileModDBFunc func(want *v1.DatabaseAccount)

func ReconcileWantDBName

func ReconcileWantDBName(name v1.PostgreSQLResourceName) ReconcileModDBFunc

func ReconcileWantReady

func ReconcileWantReady(ready bool) ReconcileModDBFunc

func ReconcileWantStage

func ReconcileWantStage(wantStage v1.DatabaseAccountCreateStage) ReconcileModDBFunc

type ReconcileModSecretFunc

type ReconcileModSecretFunc func(want *corev1.Secret)

func ReconcileWantSecretDataValue

func ReconcileWantSecretDataValue(key, value string) ReconcileModSecretFunc

func ReconcileWantSecretOwnerRefs

func ReconcileWantSecretOwnerRefs(dbAccount v1.DatabaseAccount) ReconcileModSecretFunc

type ReconcilePreModfunc

type ReconcilePreModfunc func(obj *v1.DatabaseAccount)

type ReconcileTarget

type ReconcileTarget interface {
	ReconcileModDBFunc | ReconcileModSecretFunc
}

Jump to

Keyboard shortcuts

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