Documentation ¶
Index ¶
- func NewMockRoundTripper() *mockRoundTripper
- type HTTPRecorder
- type Harness
- func (h *Harness) MustReadFile(p string) string
- func (h *Harness) NewClient(cache cache.Cache, config *rest.Config, options client.Options, ...) (client.Client, error)
- func (h *Harness) ParseObjects(y string) []*unstructured.Unstructured
- func (h *Harness) RESTConfig() *rest.Config
- func (h *Harness) Stop()
- func (h *Harness) WithObjects(initObjs ...*unstructured.Unstructured)
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockRoundTripper ¶
func NewMockRoundTripper() *mockRoundTripper
Types ¶
type HTTPRecorder ¶
type HTTPRecorder struct { Requests []Request // contains filtered or unexported fields }
func NewRecorder ¶
func NewRecorder(inner http.RoundTripper) *HTTPRecorder
type Harness ¶
type Harness struct { *testing.T Scheme *runtime.Scheme Ctx context.Context Client client.Client // contains filtered or unexported fields }
func NewHarness ¶
func (*Harness) MustReadFile ¶
MustReadFile returns the contents of the file - as a string It fails the test if the file cannot be read
func (*Harness) ParseObjects ¶
func (h *Harness) ParseObjects(y string) []*unstructured.Unstructured
func (*Harness) RESTConfig ¶
func (*Harness) WithObjects ¶
func (h *Harness) WithObjects(initObjs ...*unstructured.Unstructured)
Click to show internal directories.
Click to hide internal directories.