Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultNamespace = "default" TestAssetUseExistingCluster = "USE_EXISTING_CLUSTER" )
Variables ¶
View Source
var DefaultRetry = wait.Backoff{ Steps: 500, Duration: 10 * time.Millisecond, Factor: 1.0, Jitter: 0.1, }
DefaultRetry is the recommended retry parameters for unit testing scenarios where a condition is being tested multiple times before it is expected to succeed.
Functions ¶
func CheckCRDFiles ¶
CheckCRDFiles - validates that all crds files are found.
func UseExistingCluster ¶
func UseExistingCluster() bool
UseExistingCluster - checks if USE_EXISTING_CLUSTER environment variable is set
Types ¶
type TestEnv ¶
type TestEnv struct { envtest.Environment // contains filtered or unexported fields }
TestEnv - wrapper for controller-runtime envtest with additional functionality
func NewTestEnv ¶
NewTestEnv - create new test environment instance
func (*TestEnv) Start ¶
Start - starts and bootstraps test environment ang returns Kubernetes config instance
func (*TestEnv) Stop ¶
func (te *TestEnv) Stop()
Stop - stops test environment performing additional cleanup (if needed)
func (*TestEnv) StopAndExit ¶
StopAndExit - stops and exists, typically used as a last call in TestMain
Click to show internal directories.
Click to hide internal directories.