tests

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlreadyExist

func AlreadyExist(content interface{}) *http.Response

func BadVersion

func BadVersion(content interface{}) *http.Response

func Body

func Body(content interface{}) io.ReadCloser

func FakeNsm

func FakeNsm(name string) *v1.NetworkServiceManager

func NotFound

func NotFound(content interface{}) *http.Response

func Ok

func Ok(content interface{}) *http.Response

func RepeatAsync

func RepeatAsync(operation func()) (stopFunc func())

func Status

func Status(status int, content interface{}) *http.Response

Types

type FakeRest

type FakeRest struct {
	// contains filtered or unexported fields
}

func (FakeRest) APIVersion

func (c FakeRest) APIVersion() schema.GroupVersion

func (FakeRest) Delete

func (c FakeRest) Delete() *restclient.Request

func (FakeRest) Get

func (c FakeRest) Get() *restclient.Request

func (FakeRest) GetRateLimiter

func (c FakeRest) GetRateLimiter() flowcontrol.RateLimiter

func (*FakeRest) MockGet

func (f *FakeRest) MockGet(api string, handler MethodHandler)

func (*FakeRest) MockPost

func (f *FakeRest) MockPost(api string, handler MethodHandler)

func (*FakeRest) MockPut

func (f *FakeRest) MockPut(api string, handler MethodHandler)

func (FakeRest) Patch

func (c FakeRest) Patch(pt types.PatchType) *restclient.Request

func (FakeRest) Post

func (c FakeRest) Post() *restclient.Request

func (FakeRest) Put

func (c FakeRest) Put() *restclient.Request

func (FakeRest) Verb

func (c FakeRest) Verb(verb string) *restclient.Request

type MethodHandler

type MethodHandler = func(r *http.Request, resource string) (response *http.Response, e error)

Jump to

Keyboard shortcuts

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