tests

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCloudEventsServer

func WithCloudEventsServer(test func(serverURL url.URL) error) (*cloudevents.Event, error)

WithCloudEventsServer is a testing utility that help by starting a CloudEvents HTTP server which can catch a sent event.

func WithEnviron added in v0.3.0

func WithEnviron(env map[string]string, body func() error) error

WithEnviron will execute a block of code with temporal environment set.

Types

type FakeClients added in v0.3.0

type FakeClients struct {
	Objects []runtime.Object
	// contains filtered or unexported fields
}

FakeClients creates K8s clients from a list of objects using fake packages.

func (*FakeClients) Context added in v0.3.0

func (c *FakeClients) Context() context.Context

func (*FakeClients) Dynamic added in v0.3.0

func (c *FakeClients) Dynamic() dynamic.Interface

func (*FakeClients) Typed added in v0.3.0

func (c *FakeClients) Typed() kubernetes.Interface

type Sender added in v0.3.0

type Sender struct {
	Sent []cloudevents.Event
}

Sender is a mock sender that will record sent events for testing.

func (*Sender) Send added in v0.3.0

func (m *Sender) Send(ce cloudevents.Event) error

Send will send event to specified target.

Jump to

Keyboard shortcuts

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