Documentation
¶
Overview ¶
Add dependencies used by the build but not by the code to this file.
Index ¶
- Constants
- func AssertNodesUnchanged(c kubernetes.Interface, nodes ...*v1.Node) error
- func CreateNode(c kubernetes.Interface, name string, labels map[string]string, ...) *v1.Node
- func CreateWindowsNode(cs kubernetes.Interface, name string, variant operator.ProductVariant, ...) *v1.Node
- func DeleteAllowTigeraTierAndExpectWait(ctx context.Context, c client.Client, r reconcile.Reconciler, ...)
- func ExpectResourceCreated(c client.Client, obj client.Object)
- func ExpectResourceDestroyed(c client.Client, obj client.Object, timeout time.Duration)
- func ExpectWaitForTierWatch(ctx context.Context, r reconcile.Reconciler, mockStatus *status.MockStatus)
- func ExpectWaitForWatch(ctx context.Context, r reconcile.Reconciler, mockStatus *status.MockStatus, ...)
- func GetContainer(containers []v1.Container, name string) *v1.Container
- func GetResource(c client.Client, obj client.Object) error
- func MakeTestCA(signer string) *crypto.CA
- func NewNodeListWatch(cs kubernetes.Interface) nodeListWatch
- func NewTyphaListWatch(cs kubernetes.Interface) typhaListWatch
- func PrettyFormatProxyTestCase(testCase ProxyTestCase) string
- func RunOperator(mgr manager.Manager, ctx context.Context) (doneChan chan struct{})
- func VerifyCert(secret *v1.Secret, expectedSANs ...string)
- func VerifyCertSANs(certBytes []byte, expectedSANs ...string)
- func VerifyPublicCert(secret *v1.Secret, pubKey string, expectedSANs ...string)
- type NonZeroDefaultOption
- type ObjectTrackerCall
- type ObjectTrackerWithCalls
- func (o *ObjectTrackerWithCalls) Add(obj runtime.Object) error
- func (o *ObjectTrackerWithCalls) CallCount(gvr schema.GroupVersionResource, call ObjectTrackerCall) int
- func (o *ObjectTrackerWithCalls) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string, ...) error
- func (o *ObjectTrackerWithCalls) Delete(gvr schema.GroupVersionResource, ns, name string, _ ...metav1.DeleteOptions) error
- func (o *ObjectTrackerWithCalls) Get(gvr schema.GroupVersionResource, ns, name string, _ ...metav1.GetOptions) (runtime.Object, error)
- func (o *ObjectTrackerWithCalls) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ns string, ...) (runtime.Object, error)
- func (o *ObjectTrackerWithCalls) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, ...) error
- func (o *ObjectTrackerWithCalls) Watch(gvr schema.GroupVersionResource, ns string, _ ...metav1.ListOptions) (watch.Interface, error)
- type ProxyConfig
- type ProxyTestCase
- type ValueDefaulter
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func AssertNodesUnchanged ¶ added in v1.23.0
func AssertNodesUnchanged(c kubernetes.Interface, nodes ...*v1.Node) error
func CreateNode ¶ added in v1.23.0
func CreateWindowsNode ¶ added in v1.23.0
func CreateWindowsNode(cs kubernetes.Interface, name string, variant operator.ProductVariant, version string) *v1.Node
func DeleteAllowTigeraTierAndExpectWait ¶ added in v1.35.0
func DeleteAllowTigeraTierAndExpectWait(ctx context.Context, c client.Client, r reconcile.Reconciler, mockStatus *status.MockStatus)
DeleteAllowTigeraTierAndExpectWait deletes the tier resource and expects the Reconciler issues a degraded status, waiting for the tier to become available before progressing its status further. Assumes that mockStatus has any required initial status progression expectations set, and that the Reconciler utilizes the mockStatus object. Assumes the tier resource has been created.
func ExpectResourceCreated ¶
ExpectResourceCreated asserts that the given object is created, and populates the provided client.Object with the current state of the object in the cluster.
func ExpectResourceDestroyed ¶
ExpectResourceDestroyed asserts that the given object no longer exists.
func ExpectWaitForTierWatch ¶ added in v1.35.0
func ExpectWaitForTierWatch(ctx context.Context, r reconcile.Reconciler, mockStatus *status.MockStatus)
ExpectWaitForTierWatch expects the Reconciler issues a degraded status, waiting for a Tier watch to be established. Assumes that mockStatus has any required initial status progression expectations set, and that the Reconciler utilizes the mockStatus object.
func ExpectWaitForWatch ¶ added in v1.35.0
func ExpectWaitForWatch(ctx context.Context, r reconcile.Reconciler, mockStatus *status.MockStatus, message string)
ExpectWaitForWatch expects the Reconciler issues a degraded status, waiting for a watch to be established. Assumes that mockStatus has any required initial status progression expectations set, and that the Reconciler utilizes the mockStatus object.
func GetContainer ¶ added in v1.14.0
func GetResource ¶
GetResource gets the requested object, populating obj with its contents.
func MakeTestCA ¶ added in v1.14.0
func NewNodeListWatch ¶ added in v1.23.0
func NewNodeListWatch(cs kubernetes.Interface) nodeListWatch
func NewTyphaListWatch ¶ added in v1.23.0
func NewTyphaListWatch(cs kubernetes.Interface) typhaListWatch
func PrettyFormatProxyTestCase ¶ added in v1.37.0
func PrettyFormatProxyTestCase(testCase ProxyTestCase) string
func RunOperator ¶
RunOperator runs the provided operator manager in a separate goroutine so that the test code isn't blocked. The passed in stop channel can be closed in order to stop the execution of the operator. The channel returned will be closed when the mgr stops.
func VerifyCert ¶ added in v1.14.0
func VerifyCertSANs ¶ added in v1.14.0
Types ¶
type NonZeroDefaultOption ¶ added in v1.12.0
type NonZeroDefaultOption func(defaulter *nonZeroValueDefaulter)
func WithInterfaceImplementations ¶ added in v1.12.0
func WithInterfaceImplementations(ifaceImpls map[string]interface{}) NonZeroDefaultOption
type ObjectTrackerCall ¶ added in v1.35.3
type ObjectTrackerCall string
const ( ObjectTrackerCallGet ObjectTrackerCall = "get" ObjectTrackerCallCreate ObjectTrackerCall = "create" ObjectTrackerCallUpdate ObjectTrackerCall = "update" ObjectTrackerCallList ObjectTrackerCall = "list" ObjectTrackerCallDelete ObjectTrackerCall = "delete" ObjectTrackerCallWatch ObjectTrackerCall = "watch" )
type ObjectTrackerWithCalls ¶ added in v1.35.3
type ObjectTrackerWithCalls struct { testing.ObjectTracker // contains filtered or unexported fields }
ObjectTrackerWithCalls wraps the default implementation of testing.ObjectTracker to track the calls made.
func NewObjectTrackerWithCalls ¶ added in v1.35.3
func NewObjectTrackerWithCalls(clientScheme testing.ObjectScheme) ObjectTrackerWithCalls
func (*ObjectTrackerWithCalls) Add ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) Add(obj runtime.Object) error
func (*ObjectTrackerWithCalls) CallCount ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) CallCount(gvr schema.GroupVersionResource, call ObjectTrackerCall) int
func (*ObjectTrackerWithCalls) Create ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string, _ ...metav1.CreateOptions) error
func (*ObjectTrackerWithCalls) Delete ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) Delete(gvr schema.GroupVersionResource, ns, name string, _ ...metav1.DeleteOptions) error
func (*ObjectTrackerWithCalls) Get ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) Get(gvr schema.GroupVersionResource, ns, name string, _ ...metav1.GetOptions) (runtime.Object, error)
func (*ObjectTrackerWithCalls) List ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ns string, _ ...metav1.ListOptions) (runtime.Object, error)
func (*ObjectTrackerWithCalls) Update ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, _ ...metav1.UpdateOptions) error
func (*ObjectTrackerWithCalls) Watch ¶ added in v1.35.3
func (o *ObjectTrackerWithCalls) Watch(gvr schema.GroupVersionResource, ns string, _ ...metav1.ListOptions) (watch.Interface, error)
type ProxyConfig ¶ added in v1.37.0
type ProxyTestCase ¶ added in v1.37.0
type ProxyTestCase struct { Lowercase bool Target string PodProxies []*ProxyConfig }
type ValueDefaulter ¶ added in v1.12.0
type ValueDefaulter interface {
SetDefault(interface{}) error
}
func NewNonZeroStructDefaulter ¶ added in v1.12.0
func NewNonZeroStructDefaulter(options ...NonZeroDefaultOption) ValueDefaulter
NewNonZeroStructDefaulter creates an implementation of the ValueDefaulter that