resttest

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 added in v0.18.0

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)

func (*Tester) TestCreateDiscardsObjectNamespace added in v0.18.0

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

func (*Tester) TestCreateGeneratesName

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

func (*Tester) TestCreateGeneratesNameReturnsServerTimeout added in v0.12.0

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

func (*Tester) TestCreateHasMetadata

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

func (*Tester) TestCreateIgnoresContextNamespace added in v0.18.0

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

func (*Tester) TestCreateIgnoresMismatchedNamespace added in v0.18.0

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

func (*Tester) TestCreateInvokesValidation

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

func (*Tester) TestCreateRejectsMismatchedNamespace

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

func (*Tester) TestCreateResetsUserData

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

func (*Tester) TestDelete added in v0.14.0

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

func (*Tester) TestDeleteGraceful added in v0.14.0

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

func (*Tester) TestDeleteGracefulHasDefault added in v0.14.0

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

func (*Tester) TestDeleteGracefulUsesZeroOnNil added in v0.14.0

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

func (*Tester) TestDeleteInvokesValidation added in v0.14.0

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

func (*Tester) TestDeleteNoGraceful added in v0.14.0

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

func (*Tester) TestDeleteNonExist added in v0.14.0

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

func (*Tester) TestNamespace added in v0.18.0

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 added in v0.16.1

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

func (*Tester) TestUpdateFailsOnNotFound added in v0.16.1

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

func (*Tester) TestUpdateFailsOnVersion added in v0.16.1

func (t *Tester) TestUpdateFailsOnVersion(older runtime.Object)

Jump to

Keyboard shortcuts

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