resttest

package
v1.1.0-alpha.0....-65f4ebd Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignFunc

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

type SetRVFunc

type SetRVFunc func(resourceVersion uint64)

type Tester

type Tester struct {
	*testing.T
	// contains filtered or unexported fields
}

func New

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

func (*Tester) ClusterScope

func (t *Tester) ClusterScope() *Tester

func (*Tester) TestContext

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

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

func (*Tester) TestCreate

func (t *Tester) TestCreate(valid runtime.Object, invalid ...runtime.Object)

Test creating an object.

func (*Tester) TestDelete

func (t *Tester) TestDelete(createFn func() runtime.Object, wasGracefulFn func() bool, invalid ...runtime.Object)

Test deleting an object. TODO(wojtek-t): Change it to use AssignFunc instead.

func (*Tester) TestDeleteGraceful

func (t *Tester) TestDeleteGraceful(createFn func() runtime.Object, expectedGrace int64, wasGracefulFn func() bool)

Test graceful deletion. TODO(wojtek-t): Change it to use AssignFunc instead.

func (*Tester) TestDeleteGracefulExtend

func (t *Tester) TestDeleteGracefulExtend(existing runtime.Object, expectedGrace int64, wasGracefulFn func() bool)

func (*Tester) TestDeleteGracefulHasDefault

func (t *Tester) TestDeleteGracefulHasDefault(existing runtime.Object, expectedGrace int64, wasGracefulFn func() bool)

func (*Tester) TestDeleteGracefulImmediate

func (t *Tester) TestDeleteGracefulImmediate(existing runtime.Object, expectedGrace int64, wasGracefulFn func() bool)

func (*Tester) TestDeleteGracefulUsesZeroOnNil

func (t *Tester) TestDeleteGracefulUsesZeroOnNil(existing runtime.Object, expectedGrace int64)

func (*Tester) TestDeleteGracefulWithValue

func (t *Tester) TestDeleteGracefulWithValue(existing runtime.Object, expectedGrace int64, wasGracefulFn func() bool)

func (*Tester) TestDeleteInvokesValidation

func (t *Tester) TestDeleteInvokesValidation(invalid ...runtime.Object)

func (*Tester) TestDeleteNoGraceful

func (t *Tester) TestDeleteNoGraceful(createFn func() runtime.Object, wasGracefulFn func() bool)

func (*Tester) TestDeleteNonExist

func (t *Tester) TestDeleteNonExist(createFn func() runtime.Object)

func (*Tester) TestGet

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

Test getting object.

func (*Tester) TestList

func (t *Tester) TestList(obj runtime.Object, assignFn AssignFunc, setRVFn SetRVFunc)

Test listing object.

func (*Tester) TestNamespace

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

func (t *Tester) TestUpdate(valid runtime.Object, existing, older runtime.Object)

Test updating an object.

Jump to

Keyboard shortcuts

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