matcher

package
v0.0.0-...-b5abb6b Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: BSD-3-Clause Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultWaitTimeout = 10 * time.Second

Variables

View Source
var FwLog = logf.Log.WithName("matcher")

Functions

func EqualsK8sRes

func EqualsK8sRes(expected interface{}, timeout ...time.Duration) types.GomegaMatcher

func ExistsK8sRes

func ExistsK8sRes(waitTimeout ...time.Duration) types.GomegaMatcher

func GetAPIResourceByGvk

func GetAPIResourceByGvk(gvk schema.GroupVersionKind) (v1.APIResource, error)

func GetCurrentStateOfResource

func GetCurrentStateOfResource(apiResource v1.APIResource, gvr schema.GroupVersionResource, name, namespace string) (*unstructured.Unstructured, error)

Types

type K8sEqualsMatcher

type K8sEqualsMatcher struct {
	Expected interface{}
	Timeout  time.Duration
}

func (K8sEqualsMatcher) FailureMessage

func (m K8sEqualsMatcher) FailureMessage(actual interface{}) (message string)

func (K8sEqualsMatcher) IsMatch

func (m K8sEqualsMatcher) IsMatch(obj interface{}, path []string) bool

func (K8sEqualsMatcher) Match

func (m K8sEqualsMatcher) Match(actual interface{}) (success bool, err error)

func (K8sEqualsMatcher) NegatedFailureMessage

func (m K8sEqualsMatcher) NegatedFailureMessage(actual interface{}) (message string)

type K8sExistsMatcher

type K8sExistsMatcher struct {
	Timeout time.Duration
}

func (K8sExistsMatcher) FailureMessage

func (k K8sExistsMatcher) FailureMessage(actual interface{}) (message string)

func (K8sExistsMatcher) Match

func (k K8sExistsMatcher) Match(actual interface{}) (success bool, err error)

func (K8sExistsMatcher) NegatedFailureMessage

func (k K8sExistsMatcher) NegatedFailureMessage(actual interface{}) (message string)

type K8sResourceId

type K8sResourceId struct {
	Name      string
	Namespace string
	ParamPath []string
	Gvk       schema.GroupVersionKind
}

Jump to

Keyboard shortcuts

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