Documentation ¶
Index ¶
- Constants
- func Closer(s string) io.ReadCloser
- func DefaultCatalog() map[string]interface{}
- func DoHTTP(reaction *HTTPReaction, checks *HTTPExpectations) func(*http.Request) (*http.Response, error)
- func JSONToMap(j string) map[string]interface{}
- func MapContains(actual Object, expected Object)
- func NewSMServer(params *ContextParams, issuerURL string) *httptest.Server
- func RegisterBrokerInSM(brokerJSON Object, SM *httpexpect.Expect) string
- func RegisterPlatformInSM(platformJSON Object, SM *httpexpect.Expect) *types.Platform
- func RemoveAllBrokers(SM *httpexpect.Expect)
- func RemoveAllPlatforms(SM *httpexpect.Expect)
- func RemoveAllVisibilities(SM *httpexpect.Expect)
- func SetResponse(rw http.ResponseWriter, status int, message interface{})
- func SetTestFileLocation(set *pflag.FlagSet)
- func TestEnv(additionalFlagFuncs ...func(set *pflag.FlagSet)) env.Environment
- type Array
- type BrokerServer
- type ContextParams
- type FlagValue
- type HTTPExpectations
- type HTTPReaction
- type NopCloser
- type OAuthServer
- type Object
- type TestContext
Constants ¶
View Source
const AnotherPlan = `` /* 667-byte string literal not displayed */
View Source
const AnotherService = `` /* 720-byte string literal not displayed */
View Source
const Catalog = `` /* 3386-byte string literal not displayed */
View Source
const EmptyCatalog = `
{
"services": []
}
`
Variables ¶
This section is empty.
Functions ¶
func Closer ¶
func Closer(s string) io.ReadCloser
func DefaultCatalog ¶ added in v0.1.2
func DefaultCatalog() map[string]interface{}
func DoHTTP ¶
func DoHTTP(reaction *HTTPReaction, checks *HTTPExpectations) func(*http.Request) (*http.Response, error)
func MapContains ¶
func NewSMServer ¶ added in v0.1.2
func NewSMServer(params *ContextParams, issuerURL string) *httptest.Server
func RegisterBrokerInSM ¶ added in v0.1.2
func RegisterBrokerInSM(brokerJSON Object, SM *httpexpect.Expect) string
func RegisterPlatformInSM ¶ added in v0.1.2
func RegisterPlatformInSM(platformJSON Object, SM *httpexpect.Expect) *types.Platform
func RemoveAllBrokers ¶
func RemoveAllBrokers(SM *httpexpect.Expect)
func RemoveAllPlatforms ¶
func RemoveAllPlatforms(SM *httpexpect.Expect)
func RemoveAllVisibilities ¶ added in v0.1.6
func RemoveAllVisibilities(SM *httpexpect.Expect)
func SetResponse ¶ added in v0.1.2
func SetResponse(rw http.ResponseWriter, status int, message interface{})
func SetTestFileLocation ¶ added in v0.1.2
Types ¶
type BrokerServer ¶ added in v0.1.2
type BrokerServer struct { *httptest.Server CatalogHandler http.HandlerFunc // /v2/catalog ServiceInstanceHandler http.HandlerFunc // /v2/service_instances/{instance_id} ServiceInstanceLastOpHandler http.HandlerFunc // /v2/service_instances/{instance_id}/last_operation BindingHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id} BindingLastOpHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation BindingAdaptCredentialsHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id}/adapt_credentials Username, Password string Catalog interface{} LastRequestBody []byte LastRequest *http.Request CatalogEndpointRequests []*http.Request ServiceInstanceEndpointRequests []*http.Request ServiceInstanceLastOpEndpointRequests []*http.Request BindingEndpointRequests []*http.Request BindingLastOpEndpointRequests []*http.Request BindingAdaptCredentialsEndpointRequests []*http.Request // contains filtered or unexported fields }
func NewBrokerServer ¶ added in v0.1.2
func NewBrokerServer() *BrokerServer
func NewBrokerServerWithCatalog ¶ added in v0.1.6
func NewBrokerServerWithCatalog(catalog string) *BrokerServer
func (*BrokerServer) Reset ¶ added in v0.1.2
func (b *BrokerServer) Reset()
func (*BrokerServer) ResetCallHistory ¶ added in v0.1.2
func (b *BrokerServer) ResetCallHistory()
func (*BrokerServer) ResetHandlers ¶ added in v0.1.2
func (b *BrokerServer) ResetHandlers()
func (*BrokerServer) ResetProperties ¶ added in v0.1.2
func (b *BrokerServer) ResetProperties()
type ContextParams ¶
type ContextParams struct { RegisterExtensions func(api *web.API) DefaultTokenClaims map[string]interface{} Env env.Environment }
type FlagValue ¶ added in v0.1.2
type FlagValue struct {
// contains filtered or unexported fields
}
type HTTPExpectations ¶
type HTTPReaction ¶
type OAuthServer ¶
type OAuthServer struct { URL string // contains filtered or unexported fields }
func NewOAuthServer ¶
func NewOAuthServer() *OAuthServer
func (*OAuthServer) Close ¶
func (os *OAuthServer) Close()
func (*OAuthServer) CreateToken ¶
func (os *OAuthServer) CreateToken(payload map[string]interface{}) string
func (*OAuthServer) Start ¶
func (os *OAuthServer) Start()
type TestContext ¶
type TestContext struct { SM *httpexpect.Expect SMWithOAuth *httpexpect.Expect SMWithBasic *httpexpect.Expect TestPlatform *types.Platform OAuthServer *OAuthServer // contains filtered or unexported fields }
func NewTestContext ¶
func NewTestContext(params *ContextParams) *TestContext
func (*TestContext) Cleanup ¶
func (ctx *TestContext) Cleanup()
func (*TestContext) CleanupBroker ¶
func (ctx *TestContext) CleanupBroker(id string)
func (*TestContext) RegisterBroker ¶
func (ctx *TestContext) RegisterBroker() (string, *BrokerServer)
func (*TestContext) RegisterBrokerWithCatalog ¶ added in v0.1.6
func (ctx *TestContext) RegisterBrokerWithCatalog(catalog string) (string, *BrokerServer)
func (*TestContext) RegisterPlatform ¶ added in v0.1.6
func (ctx *TestContext) RegisterPlatform() *types.Platform
Click to show internal directories.
Click to hide internal directories.