apiserver: k8s.io/apiserver/pkg/registry/rest/resttest Index | Files

package resttest

import "k8s.io/apiserver/pkg/registry/rest/resttest"


Package Files


type AssignFunc Uses

type AssignFunc func([]runtime.Object) []runtime.Object

type CreateFunc Uses

type CreateFunc func(context.Context, runtime.Object) error

type EmitFunc Uses

type EmitFunc func(runtime.Object, string) error

type GetFunc Uses

type GetFunc func(context.Context, runtime.Object) (runtime.Object, error)

type InitWatchFunc Uses

type InitWatchFunc func()

type InjectErrFunc Uses

type InjectErrFunc func(err error)

type IsErrorFunc Uses

type IsErrorFunc func(err error) bool

type SetRVFunc Uses

type SetRVFunc func(uint64)

type Tester Uses

type Tester struct {
    // contains filtered or unexported fields

func New Uses

func New(t *testing.T, storage rest.Storage) *Tester

func (*Tester) AllowCreateOnUpdate Uses

func (t *Tester) AllowCreateOnUpdate() *Tester

func (*Tester) ClusterScope Uses

func (t *Tester) ClusterScope() *Tester

func (*Tester) GeneratesName Uses

func (t *Tester) GeneratesName() *Tester

func (*Tester) Namer Uses

func (t *Tester) Namer(namer func(int) string) *Tester

Namer allows providing a custom name maker By default "foo%d" is used

func (*Tester) ReturnDeletedObject Uses

func (t *Tester) ReturnDeletedObject() *Tester

func (*Tester) TestContext Uses

func (t *Tester) TestContext() context.Context

TestContext returns a namespaced context that will be used when making storage calls. Namespace is determined by TestNamespace()

func (*Tester) TestCreate Uses

func (t *Tester) TestCreate(valid runtime.Object, createFn CreateFunc, getFn GetFunc, invalid ...runtime.Object)

Test creating an object.

func (*Tester) TestDelete Uses

func (t *Tester) TestDelete(valid runtime.Object, createFn CreateFunc, getFn GetFunc, isNotFoundFn IsErrorFunc)

Test deleting an object.

func (*Tester) TestDeleteGraceful Uses

func (t *Tester) TestDeleteGraceful(valid runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64)

Test gracefully deleting an object.

func (*Tester) TestGet Uses

func (t *Tester) TestGet(valid runtime.Object)

Test getting object.

func (*Tester) TestList Uses

func (t *Tester) TestList(valid runtime.Object, assignFn AssignFunc)

Test listing objects.

func (*Tester) TestNamespace Uses

func (t *Tester) TestNamespace() string

TestNamespace returns the namespace that will be used when creating contexts. Returns NamespaceNone for cluster-scoped objects.

func (*Tester) TestUpdate Uses

func (t *Tester) TestUpdate(valid runtime.Object, createFn CreateFunc, getFn GetFunc, updateFn UpdateFunc, invalidUpdateFn ...UpdateFunc)

Test updating an object.

func (*Tester) TestWatch Uses

func (t *Tester) TestWatch(
    valid runtime.Object, emitFn EmitFunc,
    labelsPass, labelsFail []labels.Set, fieldsPass, fieldsFail []fields.Set, actions []string)

Test watching objects.

type UpdateFunc Uses

type UpdateFunc func(runtime.Object) runtime.Object

Package resttest imports 21 packages (graph) and is imported by 1 packages. Updated 2019-06-15. Refresh now. Tools for package owners.