Documentation ¶
Overview ¶
Package tests contains utilities for tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailBecauseNotFound ¶
func FailBecauseNotFound() types.GomegaMatcher
FailBecauseNotFound returns a new IsNotFoundErrorMatcher to catch k8s not-found errors.
func LogsToGinkgoWriter ¶
func LogsToGinkgoWriter()
LogsToGinkgoWriter configures klog to output the logs to GinkgoWriter, instead of stdout. This allows to output the logs only in case of failing tests, simplifying troubleshooting.
Types ¶
type IsNotFoundErrorMatcher ¶
type IsNotFoundErrorMatcher struct{}
IsNotFoundErrorMatcher is a custom matcher to check when kubernetes resources do not exist.
func (*IsNotFoundErrorMatcher) FailureMessage ¶
func (s *IsNotFoundErrorMatcher) FailureMessage(actual interface{}) (message string)
FailureMessage is called when the matcher fails positively.
func (*IsNotFoundErrorMatcher) Match ¶
func (s *IsNotFoundErrorMatcher) Match(actual interface{}) (success bool, err error)
Match is a GomegaMatcher interface method to actually run the matcher.
func (*IsNotFoundErrorMatcher) NegatedFailureMessage ¶
func (s *IsNotFoundErrorMatcher) NegatedFailureMessage(actual interface{}) (message string)
NegatedFailureMessage is called when the matcher fails negatively.
Click to show internal directories.
Click to hide internal directories.