fakeservicebroker

package
v6.47.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

fakeservicebroker is a test helper for service broker tests. It can push an App that acts as a service broker, and as an optimisation, it will reuse the same App so that multiple pushes aren't necessary. This saves significant time when running tests.

To make use of this optimisation, set 'KEEP_FAKE_SERVICE_BROKERS' to 'true'

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup()

Cleanup should be run in a SynchronizedAfterSuite() to clean up the reusable broker apps

func Setup

func Setup()

Setup should be run in a SynchronisedBeforeSuite() to create the org and space, otherwise the tests become flaky.

Types

type FakeServiceBroker

type FakeServiceBroker struct {
	Services []service
	// contains filtered or unexported fields
}

func New

func New() *FakeServiceBroker

New creates a default object that can then be configured

func NewAlternate

func NewAlternate() *FakeServiceBroker

NewAlternate returns a reusable broker with another name. Can be used in conjunction with New() if you need two brokers in the same test.

func (*FakeServiceBroker) Destroy

func (f *FakeServiceBroker) Destroy()

Destroy always deletes the broker and app, meaning it can't be reused. In general you should not destroy brokers as it makes tests slower.

func (*FakeServiceBroker) EnableServiceAccess

func (f *FakeServiceBroker) EnableServiceAccess()

func (*FakeServiceBroker) EnsureAppIsDeployed

func (f *FakeServiceBroker) EnsureAppIsDeployed() *FakeServiceBroker

EnsureAppIsDeployed makes the fake service broker app available and does not run 'cf create-service-broker'

func (*FakeServiceBroker) EnsureBrokerIsAvailable

func (f *FakeServiceBroker) EnsureBrokerIsAvailable() *FakeServiceBroker

EnsureBrokerIsAvailable makes the service broker app available and runs 'cf create-service-broker'

func (*FakeServiceBroker) Name

func (f *FakeServiceBroker) Name() string

func (*FakeServiceBroker) ServiceDescription

func (f *FakeServiceBroker) ServiceDescription() string

func (*FakeServiceBroker) ServiceName

func (f *FakeServiceBroker) ServiceName() string

func (*FakeServiceBroker) ServicePlanDescription

func (f *FakeServiceBroker) ServicePlanDescription() string

func (*FakeServiceBroker) ServicePlanName

func (f *FakeServiceBroker) ServicePlanName() string

func (*FakeServiceBroker) URL

func (f *FakeServiceBroker) URL(paths ...string) string

func (*FakeServiceBroker) Update

func (f *FakeServiceBroker) Update() *FakeServiceBroker

func (*FakeServiceBroker) WithAsyncBehaviour

func (f *FakeServiceBroker) WithAsyncBehaviour() *FakeServiceBroker

func (*FakeServiceBroker) WithName

func (f *FakeServiceBroker) WithName(name string) *FakeServiceBroker

WithName has the side-effect that the broker is not reusable

Jump to

Keyboard shortcuts

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