Documentation
¶
Index ¶
- func Eventually(t TestingT, condition func() (success bool, reason string), ...)
- func EventuallyCondition(t TestingT, getter func() (conditions.Getter, error), ...)
- func EventuallyReady(t TestingT, getter func() (conditions.Getter, error), ...)
- func LoadKubeConfig(kubeconfigPath, contextName string) (clientcmd.ClientConfig, error)
- func RepositoryBinDir() string
- func RepositoryDir() string
- type ConditionEvaluator
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Eventually ¶
func Eventually(t TestingT, condition func() (success bool, reason string), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
Eventually asserts that given condition will be met in waitFor time, periodically checking target function each tick. In addition to require.Eventually, this function t.Logs the reason string value returned by the condition function (eventually after 20% of the wait time) to aid in debugging.
func EventuallyCondition ¶
func EventuallyCondition(t TestingT, getter func() (conditions.Getter, error), evaluator *ConditionEvaluator, msgAndArgs ...interface{})
EventuallyCondition asserts that the object returned by getter() eventually has a condition that matches the evaluator.
func EventuallyReady ¶
func EventuallyReady(t TestingT, getter func() (conditions.Getter, error), msgAndArgs ...interface{})
EventuallyReady asserts that the object returned by getter() eventually has a ready condition.
func LoadKubeConfig ¶
func LoadKubeConfig(kubeconfigPath, contextName string) (clientcmd.ClientConfig, error)
LoadKubeConfig loads a kubeconfig from disk. This method is intended to be common between fixture for servers whose lifecycle is test-managed and fixture for servers whose lifecycle is managed separately from a test run.
func RepositoryBinDir ¶
func RepositoryBinDir() string
RepositoryBinDir returns the absolute path of <repo-dir>/bin. That's where `make build` produces our binaries.
func RepositoryDir ¶
func RepositoryDir() string
RepositoryDir returns the absolute path of kcp-dev/kcp repository on disk.
Types ¶
type ConditionEvaluator ¶
type ConditionEvaluator struct {
// contains filtered or unexported fields
}
func Is ¶
func Is(conditionType conditionsv1alpha1.ConditionType) *ConditionEvaluator
func IsNot ¶
func IsNot(conditionType conditionsv1alpha1.ConditionType) *ConditionEvaluator
func (*ConditionEvaluator) WithReason ¶
func (c *ConditionEvaluator) WithReason(reason string) *ConditionEvaluator