Documentation ¶
Index ¶
- func NewRequest(t *testing.T, scheme *runtime.Scheme, input kclient.Object, ...) router.Request
- func NewRequestWithContext(t *testing.T, ctx context.Context, scheme *runtime.Scheme, ...) router.Request
- type Client
- func (c *Client) Create(ctx context.Context, obj kclient.Object, opts ...kclient.CreateOption) error
- func (c *Client) Delete(ctx context.Context, obj kclient.Object, opts ...kclient.DeleteOption) error
- func (c *Client) DeleteAllOf(ctx context.Context, obj kclient.Object, opts ...kclient.DeleteAllOfOption) error
- func (c *Client) Get(ctx context.Context, key kclient.ObjectKey, out kclient.Object, ...) error
- func (c *Client) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
- func (c *Client) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (c *Client) List(ctx context.Context, objList kclient.ObjectList, opts ...kclient.ListOption) error
- func (c *Client) Patch(ctx context.Context, obj kclient.Object, patch kclient.Patch, ...) error
- func (c *Client) RESTMapper() meta2.RESTMapper
- func (c *Client) Scheme() *runtime.Scheme
- func (c *Client) Status() kclient.StatusWriter
- func (c *Client) SubResource(subResource string) kclient.SubResourceClient
- func (c *Client) Update(ctx context.Context, o kclient.Object, opts ...kclient.UpdateOption) error
- func (c Client) Watch(ctx context.Context, obj kclient.ObjectList, opts ...kclient.ListOption) (watch.Interface, error)
- type Harness
- func (b *Harness) Invoke(t *testing.T, input kclient.Object, handler router.Handler) (*Response, error)
- func (b *Harness) InvokeFunc(t *testing.T, input kclient.Object, handler router.HandlerFunc) (*Response, error)
- func (b *Harness) InvokeFuncWithContext(t *testing.T, ctx context.Context, input kclient.Object, ...) (*Response, error)
- func (b *Harness) InvokeWithContext(t *testing.T, ctx context.Context, input kclient.Object, ...) (*Response, error)
- func (b *Harness) SanitizedYAML(t *testing.T, objs []kclient.Object) string
- type ObjectKey
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
Types ¶
type Client ¶
type Client struct { Objects []kclient.Object SchemeObj *runtime.Scheme Created []kclient.Object Updated []kclient.Object }
func (*Client) DeleteAllOf ¶
func (*Client) GroupVersionKindFor ¶
func (*Client) IsObjectNamespaced ¶
func (*Client) List ¶
func (c *Client) List(ctx context.Context, objList kclient.ObjectList, opts ...kclient.ListOption) error
func (*Client) RESTMapper ¶
func (c *Client) RESTMapper() meta2.RESTMapper
func (*Client) Status ¶
func (c *Client) Status() kclient.StatusWriter
func (*Client) SubResource ¶
func (c *Client) SubResource(subResource string) kclient.SubResourceClient
type Harness ¶
type Harness struct { Scheme *runtime.Scheme Existing []kclient.Object ExpectedOutput []kclient.Object ExpectedGoldenPath string ExpectedDelay time.Duration }
func (*Harness) InvokeFunc ¶
func (*Harness) InvokeFuncWithContext ¶
func (*Harness) InvokeWithContext ¶
type Response ¶
type Response struct { router.ResponseAttributes Delay time.Duration Collected []kclient.Object Client *Client NoPrune bool }
func DefaultTest ¶
func (*Response) DisablePrune ¶
func (r *Response) DisablePrune()
func (*Response) RetryAfter ¶
Click to show internal directories.
Click to hide internal directories.