Documentation ¶
Index ¶
- Constants
- Variables
- func AssertTransitiveResources(operation *types.Operation, expectations TransitiveResourcesExpectation)
- func Closer(s string) io.ReadCloser
- func CreateBindingByInstanceID(SM *SMExpect, async string, expectedStatusCode int, instanceID string, ...) *httpexpect.Response
- func CreateInstanceInPlatform(ctx *TestContext, platformID string) (string, *types.ServiceInstance)
- func CreateInstanceInPlatformForPlan(ctx *TestContext, platformID, planID string, shared bool) *types.ServiceInstance
- func CreateReferenceInstance(smExpect *SMExpect, async string, expectedStatusCode int, ...) *httpexpect.Response
- func CreateReferenceInstanceInPlatform(ctx *TestContext, platformID, planID, referencedInstanceID string) *types.ServiceInstance
- func CreateVisibilitiesForAllBrokerPlans(SM *SMExpect, brokerID string)
- func DelayingHandler(done chan interface{}) func(req *http.Request) (int, map[string]interface{})
- func DeleteBinding(ctx *TestContext, bindingID, instanceID string) error
- func DeleteInstance(ctx *TestContext, instanceID, servicePlanID string) error
- func DoHTTP(reaction *HTTPReaction, checks *HTTPExpectations) util.DoRequestFunc
- func DoHTTPSequence(sequence []HTTPCouple) util.DoRequestFunc
- func DoHTTPWithClient(reaction *HTTPReaction, checks *HTTPExpectations) util.DoRequestWithClientFunc
- func ExtractResourceIDs(entities []Object) []string
- func ExtractTenantFunc(request *web.Request) (string, error)
- func GenerateFreeTestPlan() string
- func GeneratePaidTestPlan() string
- func GenerateRandomNotification() *types.Notification
- func GenerateShareableFreeTestPlan() string
- func GenerateShareableNonBindablePlan() string
- func GenerateShareablePaidTestPlan() (string, string)
- func GenerateShareableTestPlanWithID(planID string) string
- func GenerateTestPlan() string
- func GenerateTestPlanFromTemplate(id, planTemplate string) string
- func GenerateTestPlanWithID(planID string) string
- func GenerateTestServiceWithPlans(plans ...string) string
- func GenerateTestServiceWithPlansNonBindable(plans ...string) string
- func GenerateTestServiceWithPlansWithID(serviceID string, plans ...string) string
- func GenerateTestServiceWithPlansWithIDNonBindable(serviceID string, plans ...string) string
- func GetInstanceObjectByID(ctx *TestContext, instanceID string) (*types.ServiceInstance, error)
- func GetOsbProvisionFunc(ctx *TestContext, instanceID, osbURL, catalogServiceID, catalogPlanID string) func() string
- func GetPlanByKey(ctx *TestContext, key, value string) *types.ServicePlan
- func GetReferencePlanOfExistingPlan(ctx *TestContext, byOperator, servicePlanID string) *types.ServicePlan
- func GetSMAAPProvisionInstanceFunc(ctx *TestContext, async, planID string) func() string
- func GetVerifyContextHandlerFunc(publicKeyStr string) func(http.ResponseWriter, *http.Request)
- func JSONToMap(j string) map[string]interface{}
- func MapContains(actual Object, expected Object)
- func MergeObjects(target, source Object)
- func MultipleErrorsBeforeSuccessHandler(initialStatusCode, finalStatusCode int, initialBody, finalBody Object) func(_ *http.Request) (int, map[string]interface{})
- func MultiplePollsRequiredHandler(state, finalState string) func(_ *http.Request) (int, map[string]interface{})
- func NewSMListener() (net.Listener, error)
- func OsbBind(ctx *TestContext, ...) *httpexpect.Response
- func ParameterizedHandler(statusCode int, responseBody map[string]interface{}) func(_ *http.Request) (int, map[string]interface{})
- func Print(message string, args ...interface{})
- func ProvisionInstanceAndVerifySignature(ctx *TestContext, brokerServer *BrokerServer, provisionFunc func() string, ...) string
- func RegisterPlatformInSM(platformJSON Object, SM *SMExpect, headers map[string]string) *types.Platform
- func RegisterPlatformInSMQuery(platformJSON Object, SM *SMExpect, headers map[string]string, query string) *types.Platform
- func RegisterVisibilityForPlanAndPlatform(SM *SMExpect, planID, platformID string) string
- func RemoveAllBindings(testCtx *TestContext) error
- func RemoveAllBrokers(repository storage.TransactionalRepository)
- func RemoveAllInstances(testCtx *TestContext) error
- func RemoveAllNotifications(repository storage.TransactionalRepository)
- func RemoveAllOperations(repository storage.TransactionalRepository)
- func RemoveAllPlatforms(repository storage.TransactionalRepository)
- func RemoveAllVisibilities(repository storage.TransactionalRepository)
- func RemoveResourceByCriterion(testCtx *TestContext, criterion query.Criterion, resourceType types.ObjectType) error
- func SetLogOutput(set *pflag.FlagSet)
- func SetNotificationsCleanerSettings(set *pflag.FlagSet)
- func SetResponse(rw http.ResponseWriter, status int, message map[string]interface{})
- func SetTestFileLocation(set *pflag.FlagSet)
- func ShareInstance(smClient *SMExpect, async bool, expectedStatusCode int, instanceID string) *httpexpect.Response
- func ShareInstanceOnDB(ctx *TestContext, instanceID string) error
- func SmaapBind(ctx *TestContext, async, instanceID string) string
- func TestEnv(additionalFlagFuncs ...func(set *pflag.FlagSet)) env.Environment
- func VerifyOperationExists(ctx *TestContext, operationURL string, expectations OperationExpectations) (string, string)
- func VerifyResource(smClient *SMExpect, expectations ResourceExpectations, async string, ...) *httpexpect.Object
- func VerifyResourceDoesNotExist(smClient *SMExpect, expectations ResourceExpectations)
- func VerifyResourceExists(smClient *SMExpect, expectations ResourceExpectations) *httpexpect.Object
- func VerifySignatureNotPersisted(ctx *TestContext, objType types.ObjectType, id string)
- type Array
- type BrokerContext
- type BrokerServer
- func NewBrokerServer() *BrokerServer
- func NewBrokerServerMTLS(serverCertificate []byte, serverCertificateKey []byte, certificates ...[]byte) *BrokerServer
- func NewBrokerServerWithCatalog(catalog SBCatalog) *BrokerServer
- func NewBrokerServerWithTLSAndCatalog(catalog SBCatalog, serverCertificate []byte, serverCertificateKey []byte, ...) *BrokerServer
- func (b *BrokerServer) BindingHandlerFunc(method, op string, ...)
- func (b *BrokerServer) BindingLastOpHandlerFunc(op string, handler func(req *http.Request) (int, map[string]interface{}))
- func (b *BrokerServer) Reset()
- func (b *BrokerServer) ResetCallHistory()
- func (b *BrokerServer) ResetHandlers()
- func (b *BrokerServer) ResetProperties()
- func (b *BrokerServer) ServiceInstanceHandlerFunc(method, op string, ...)
- func (b *BrokerServer) ServiceInstanceLastOpHandlerFunc(op string, handler func(req *http.Request) (int, map[string]interface{}))
- func (b *BrokerServer) ShouldRecordRequests(shouldRecordRequests bool)
- func (b *BrokerServer) URL() string
- type BrokerUtils
- func (ctx *BrokerUtils) AddPlanVisibilityForPlatform(planCatalogID string, platformID string, orgID string) *BrokerUtils
- func (ctx *BrokerUtils) Cleanup(broker BrokerContext)
- func (ctx *BrokerUtils) Get() string
- func (ctx *BrokerUtils) GetAsServiceInstancePayload() (Object, string)
- func (ctx *BrokerUtils) GetBrokerAsParams() (string, Object, *BrokerServer)
- func (ctx *BrokerUtils) GetBrokerOSBURL(brokerID string) string
- func (ctx *BrokerUtils) GetPlan(forPlan int, key string) *BrokerUtils
- func (ctx *BrokerUtils) GetPlanCatalogId(service, plan int) string
- func (ctx *BrokerUtils) GetServiceCatalogId(service int) string
- func (ctx *BrokerUtils) GetServiceOfferings(brokerId string) *BrokerUtils
- func (ctx *BrokerUtils) GetServicePlans(forOffering int, key string) *BrokerUtils
- func (ctx *BrokerUtils) RegisterPlatformToBroker(username, password, brokerID string)
- func (ctx *BrokerUtils) SelectBroker(broker *BrokerContext) *BrokerUtils
- func (ctx *BrokerUtils) SetAuthContext(authContext *SMExpect) *BrokerUtils
- type BrokerUtilsContext
- type FakeServer
- type FlagValue
- type HTTPCouple
- type HTTPExpectations
- type HTTPReaction
- type NopCloser
- type OAuthServer
- type OAuthTLSServer
- type Object
- func CopyFields(obj Object) Object
- func CopyLabels(obj Object) Object
- func CopyObject(obj Object) Object
- func GenerateRandomBroker() Object
- func GenerateRandomPlatform() Object
- func MakePlatform(id string, name string, atype string, description string) Object
- func RegisterBrokerInSM(brokerJSON Object, SM *SMExpect, headers map[string]string, expectedStatus int) Object
- func RemoveBooleanArgs(obj Object) Object
- func RemoveNonJSONArgs(obj Object) Object
- func RemoveNonNumericOrDateArgs(obj Object) Object
- func RemoveNotNullableFieldAndLabels(obj Object, objithMandatoryFields Object) Object
- func RemoveNumericAndDateArgs(obj Object) Object
- type OperationExpectations
- type ResourceExpectations
- type SBCatalog
- type SMExpect
- type TestContext
- func (ctx *TestContext) Cleanup()
- func (ctx *TestContext) CleanupAdditionalResources()
- func (ctx *TestContext) CleanupAll(cleanupResources bool)
- func (ctx *TestContext) CleanupBroker(id string)
- func (ctx *TestContext) CleanupPlatforms()
- func (ctx *TestContext) CloseWebSocket(conn *websocket.Conn)
- func (ctx *TestContext) ConnectWebSocket(platform *types.Platform, queryParams map[string]string, ...) (*websocket.Conn, *http.Response, error)
- func (ctx *TestContext) NewTenantExpect(clientID, tenantIdentifier string, scopes ...string) *SMExpect
- func (ctx *TestContext) RegisterBroker() *BrokerUtils
- func (ctx *TestContext) RegisterBrokerWithCatalog(catalog SBCatalog) *BrokerUtils
- func (ctx *TestContext) RegisterBrokerWithCatalogAndLabels(catalog SBCatalog, brokerData Object, expectedStatus int) *BrokerUtils
- func (ctx *TestContext) RegisterBrokerWithCatalogAndLabelsExpect(catalog SBCatalog, brokerData Object, expect *SMExpect, expectedStatus int) *BrokerUtils
- func (ctx *TestContext) RegisterBrokerWithRandomCatalogAndTLS(expect *SMExpect) *BrokerUtils
- func (ctx *TestContext) RegisterPlatform() *types.Platform
- func (ctx *TestContext) RegisterPlatformAndActivate(activate bool) *types.Platform
- func (ctx *TestContext) RegisterPlatformWithType(platformType string) *types.Platform
- func (ctx *TestContext) RegisterPlatformWithTypeAndActivate(platformType string, activate bool) *types.Platform
- func (ctx *TestContext) RegisterTenantPlatform() *types.Platform
- func (ctx *TestContext) TryRegisterBrokerWithCatalogAndLabels(catalog SBCatalog, brokerData Object, expect *SMExpect, expectedStatus int) (*BrokerServer, *BrokerServer, Object, Object)
- type TestContextBuilder
- func (tcb *TestContextBuilder) Build() *TestContext
- func (tcb *TestContextBuilder) BuildWithCleanup(shouldCleanup bool) *TestContext
- func (tcb *TestContextBuilder) BuildWithListener(listener net.Listener, cleanup bool) *TestContext
- func (tcb *TestContextBuilder) BuildWithoutCleanup() *TestContext
- func (tcb *TestContextBuilder) ShouldUseSeparateOAuthServerForTenantAccess(use bool) *TestContextBuilder
- func (tcb *TestContextBuilder) SkipBasicAuthClientSetup(shouldSkip bool) *TestContextBuilder
- func (tcb *TestContextBuilder) WithAdditionalFakeServers(additionalFakeServers map[string]FakeServer) *TestContextBuilder
- func (tcb *TestContextBuilder) WithBasicAuthPlatformName(name string) *TestContextBuilder
- func (tcb *TestContextBuilder) WithDefaultEnv(envCreateFunc func(f ...func(set *pflag.FlagSet)) env.Environment) *TestContextBuilder
- func (tcb *TestContextBuilder) WithDefaultTokenClaims(defaultTokenClaims map[string]interface{}) *TestContextBuilder
- func (tcb *TestContextBuilder) WithEnvPostExtensions(fs ...func(e env.Environment, servers map[string]FakeServer)) *TestContextBuilder
- func (tcb *TestContextBuilder) WithEnvPreExtensions(fs ...func(set *pflag.FlagSet)) *TestContextBuilder
- func (tcb *TestContextBuilder) WithSMExtensions(...) *TestContextBuilder
- func (tcb *TestContextBuilder) WithTenantTokenClaims(tenantTokenClaims map[string]interface{}) *TestContextBuilder
- type TransitiveResourcesExpectation
Constants ¶
View Source
const BrokerServerPrefix = "broker-"
View Source
const BrokerServerPrefixTLS = "broker-tls-"
View Source
const OauthServer = "oauth-server"
View Source
const SMServer = "sm-server"
View Source
const TenantOauthServer = "tenant-oauth-server"
Variables ¶
View Source
var (
CFContext = `` /* 337-byte string literal not displayed */
)
Functions ¶
func AssertTransitiveResources ¶ added in v0.12.0
func AssertTransitiveResources(operation *types.Operation, expectations TransitiveResourcesExpectation)
func Closer ¶
func Closer(s string) io.ReadCloser
func CreateBindingByInstanceID ¶ added in v0.19.5
func CreateInstanceInPlatform ¶ added in v0.10.0
func CreateInstanceInPlatform(ctx *TestContext, platformID string) (string, *types.ServiceInstance)
func CreateInstanceInPlatformForPlan ¶ added in v0.10.0
func CreateInstanceInPlatformForPlan(ctx *TestContext, platformID, planID string, shared bool) *types.ServiceInstance
func CreateReferenceInstance ¶ added in v0.19.5
func CreateReferenceInstanceInPlatform ¶ added in v0.19.5
func CreateReferenceInstanceInPlatform(ctx *TestContext, platformID, planID, referencedInstanceID string) *types.ServiceInstance
func CreateVisibilitiesForAllBrokerPlans ¶ added in v0.6.0
func DelayingHandler ¶ added in v0.10.0
func DeleteBinding ¶ added in v0.10.0
func DeleteBinding(ctx *TestContext, bindingID, instanceID string) error
func DeleteInstance ¶ added in v0.10.0
func DeleteInstance(ctx *TestContext, instanceID, servicePlanID string) error
func DoHTTP ¶
func DoHTTP(reaction *HTTPReaction, checks *HTTPExpectations) util.DoRequestFunc
func DoHTTPSequence ¶ added in v0.6.0
func DoHTTPSequence(sequence []HTTPCouple) util.DoRequestFunc
func DoHTTPWithClient ¶ added in v0.12.0
func DoHTTPWithClient(reaction *HTTPReaction, checks *HTTPExpectations) util.DoRequestWithClientFunc
func ExtractResourceIDs ¶ added in v0.1.8
func ExtractTenantFunc ¶ added in v0.16.6
func GenerateFreeTestPlan ¶ added in v0.1.8
func GenerateFreeTestPlan() string
func GeneratePaidTestPlan ¶ added in v0.1.8
func GeneratePaidTestPlan() string
func GenerateRandomNotification ¶ added in v0.3.0
func GenerateRandomNotification() *types.Notification
func GenerateShareableFreeTestPlan ¶ added in v0.19.5
func GenerateShareableFreeTestPlan() string
func GenerateShareableNonBindablePlan ¶ added in v0.19.5
func GenerateShareableNonBindablePlan() string
func GenerateShareablePaidTestPlan ¶ added in v0.19.5
func GenerateShareableTestPlanWithID ¶ added in v0.19.5
func GenerateTestPlan ¶ added in v0.1.8
func GenerateTestPlan() string
func GenerateTestPlanFromTemplate ¶ added in v0.1.8
func GenerateTestPlanWithID ¶ added in v0.9.0
func GenerateTestServiceWithPlans ¶ added in v0.1.8
func GenerateTestServiceWithPlansNonBindable ¶ added in v0.19.5
func GenerateTestServiceWithPlansWithID ¶ added in v0.9.0
func GenerateTestServiceWithPlansWithIDNonBindable ¶ added in v0.19.5
func GetInstanceObjectByID ¶ added in v0.19.5
func GetInstanceObjectByID(ctx *TestContext, instanceID string) (*types.ServiceInstance, error)
func GetOsbProvisionFunc ¶ added in v0.21.3
func GetOsbProvisionFunc(ctx *TestContext, instanceID, osbURL, catalogServiceID, catalogPlanID string) func() string
func GetPlanByKey ¶ added in v0.19.5
func GetPlanByKey(ctx *TestContext, key, value string) *types.ServicePlan
func GetReferencePlanOfExistingPlan ¶ added in v0.19.5
func GetReferencePlanOfExistingPlan(ctx *TestContext, byOperator, servicePlanID string) *types.ServicePlan
func GetSMAAPProvisionInstanceFunc ¶ added in v0.21.3
func GetSMAAPProvisionInstanceFunc(ctx *TestContext, async, planID string) func() string
func GetVerifyContextHandlerFunc ¶ added in v0.21.3
func GetVerifyContextHandlerFunc(publicKeyStr string) func(http.ResponseWriter, *http.Request)
func MapContains ¶
func MergeObjects ¶ added in v0.1.11
func MergeObjects(target, source Object)
func MultipleErrorsBeforeSuccessHandler ¶ added in v0.10.0
func MultiplePollsRequiredHandler ¶ added in v0.10.0
func NewSMListener ¶ added in v0.4.1
func OsbBind ¶ added in v0.21.3
func OsbBind(ctx *TestContext, instanceID, bindingID, osbURL, catalogServiceID, catalogPlanID string) *httpexpect.Response
func ParameterizedHandler ¶ added in v0.10.0
func ProvisionInstanceAndVerifySignature ¶ added in v0.21.3
func ProvisionInstanceAndVerifySignature(ctx *TestContext, brokerServer *BrokerServer, provisionFunc func() string, publicKeyStr string) string
func RegisterPlatformInSM ¶ added in v0.1.2
func RegisterPlatformInSMQuery ¶ added in v0.18.2
func RegisterVisibilityForPlanAndPlatform ¶ added in v0.6.0
func RemoveAllBindings ¶ added in v0.10.0
func RemoveAllBindings(testCtx *TestContext) error
func RemoveAllBrokers ¶
func RemoveAllBrokers(repository storage.TransactionalRepository)
func RemoveAllInstances ¶ added in v0.9.0
func RemoveAllInstances(testCtx *TestContext) error
func RemoveAllNotifications ¶ added in v0.9.0
func RemoveAllNotifications(repository storage.TransactionalRepository)
func RemoveAllOperations ¶ added in v0.9.0
func RemoveAllOperations(repository storage.TransactionalRepository)
func RemoveAllPlatforms ¶
func RemoveAllPlatforms(repository storage.TransactionalRepository)
func RemoveAllVisibilities ¶ added in v0.1.6
func RemoveAllVisibilities(repository storage.TransactionalRepository)
func RemoveResourceByCriterion ¶ added in v0.14.0
func RemoveResourceByCriterion(testCtx *TestContext, criterion query.Criterion, resourceType types.ObjectType) error
func SetLogOutput ¶ added in v0.5.0
func SetNotificationsCleanerSettings ¶ added in v0.3.0
func SetResponse ¶ added in v0.1.2
func SetResponse(rw http.ResponseWriter, status int, message map[string]interface{})
func SetTestFileLocation ¶ added in v0.1.2
func ShareInstance ¶ added in v0.19.5
func ShareInstanceOnDB ¶ added in v0.19.5
func ShareInstanceOnDB(ctx *TestContext, instanceID string) error
func SmaapBind ¶ added in v0.21.3
func SmaapBind(ctx *TestContext, async, instanceID string) string
func TestEnv ¶ added in v0.1.2
func TestEnv(additionalFlagFuncs ...func(set *pflag.FlagSet)) env.Environment
func VerifyOperationExists ¶ added in v0.10.0
func VerifyOperationExists(ctx *TestContext, operationURL string, expectations OperationExpectations) (string, string)
func VerifyResource ¶ added in v0.15.1
func VerifyResource(smClient *SMExpect, expectations ResourceExpectations, async string, isBrokerAsyncResponse bool) *httpexpect.Object
func VerifyResourceDoesNotExist ¶ added in v0.10.0
func VerifyResourceDoesNotExist(smClient *SMExpect, expectations ResourceExpectations)
func VerifyResourceExists ¶ added in v0.10.0
func VerifyResourceExists(smClient *SMExpect, expectations ResourceExpectations) *httpexpect.Object
func VerifySignatureNotPersisted ¶ added in v0.21.3
func VerifySignatureNotPersisted(ctx *TestContext, objType types.ObjectType, id string)
Types ¶
type BrokerContext ¶ added in v0.12.0
type BrokerContext struct { BrokerServer *BrokerServer JSON Object ID string GeneratedCatalog SBCatalog }
type BrokerServer ¶ added in v0.1.2
type BrokerServer struct { *httptest.Server CatalogHandler http.HandlerFunc // /v2/catalog ServiceInstanceHandler http.HandlerFunc // Provision/v2/service_instances/{instance_id} ServiceInstanceLastOpHandler http.HandlerFunc // /v2/service_instances/{instance_id}/last_operation ServiceInstanceOperations []string BindingHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id} BindingAdaptCredentialsHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id}/adapt_credentials BindingLastOpHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation ServiceBindingOperations []string Username, Password string Catalog SBCatalog 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 NewBrokerServerMTLS ¶ added in v0.19.6
func NewBrokerServerMTLS(serverCertificate []byte, serverCertificateKey []byte, certificates ...[]byte) *BrokerServer
func NewBrokerServerWithCatalog ¶ added in v0.1.6
func NewBrokerServerWithCatalog(catalog SBCatalog) *BrokerServer
func NewBrokerServerWithTLSAndCatalog ¶ added in v0.12.0
func NewBrokerServerWithTLSAndCatalog(catalog SBCatalog, serverCertificate []byte, serverCertificateKey []byte, clientCertificates ...[]byte) *BrokerServer
func (*BrokerServer) BindingHandlerFunc ¶ added in v0.10.0
func (*BrokerServer) BindingLastOpHandlerFunc ¶ added in v0.10.0
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()
func (*BrokerServer) ServiceInstanceHandlerFunc ¶ added in v0.10.0
func (*BrokerServer) ServiceInstanceLastOpHandlerFunc ¶ added in v0.10.0
func (*BrokerServer) ShouldRecordRequests ¶ added in v0.10.0
func (b *BrokerServer) ShouldRecordRequests(shouldRecordRequests bool)
func (*BrokerServer) URL ¶ added in v0.1.9
func (b *BrokerServer) URL() string
type BrokerUtils ¶ added in v0.12.0
type BrokerUtils struct { Broker BrokerContext BrokerWithTLS BrokerContext Context BrokerUtilsContext // contains filtered or unexported fields }
func (*BrokerUtils) AddPlanVisibilityForPlatform ¶ added in v0.12.0
func (ctx *BrokerUtils) AddPlanVisibilityForPlatform(planCatalogID string, platformID string, orgID string) *BrokerUtils
func (*BrokerUtils) Cleanup ¶ added in v0.12.0
func (ctx *BrokerUtils) Cleanup(broker BrokerContext)
func (*BrokerUtils) Get ¶ added in v0.12.0
func (ctx *BrokerUtils) Get() string
func (*BrokerUtils) GetAsServiceInstancePayload ¶ added in v0.12.0
func (ctx *BrokerUtils) GetAsServiceInstancePayload() (Object, string)
func (*BrokerUtils) GetBrokerAsParams ¶ added in v0.12.0
func (ctx *BrokerUtils) GetBrokerAsParams() (string, Object, *BrokerServer)
func (*BrokerUtils) GetBrokerOSBURL ¶ added in v0.12.0
func (ctx *BrokerUtils) GetBrokerOSBURL(brokerID string) string
func (*BrokerUtils) GetPlan ¶ added in v0.12.0
func (ctx *BrokerUtils) GetPlan(forPlan int, key string) *BrokerUtils
func (*BrokerUtils) GetPlanCatalogId ¶ added in v0.12.0
func (ctx *BrokerUtils) GetPlanCatalogId(service, plan int) string
func (*BrokerUtils) GetServiceCatalogId ¶ added in v0.12.0
func (ctx *BrokerUtils) GetServiceCatalogId(service int) string
func (*BrokerUtils) GetServiceOfferings ¶ added in v0.12.0
func (ctx *BrokerUtils) GetServiceOfferings(brokerId string) *BrokerUtils
func (*BrokerUtils) GetServicePlans ¶ added in v0.12.0
func (ctx *BrokerUtils) GetServicePlans(forOffering int, key string) *BrokerUtils
func (*BrokerUtils) RegisterPlatformToBroker ¶ added in v0.12.0
func (ctx *BrokerUtils) RegisterPlatformToBroker(username, password, brokerID string)
func (*BrokerUtils) SelectBroker ¶ added in v0.12.0
func (ctx *BrokerUtils) SelectBroker(broker *BrokerContext) *BrokerUtils
func (*BrokerUtils) SetAuthContext ¶ added in v0.12.0
func (ctx *BrokerUtils) SetAuthContext(authContext *SMExpect) *BrokerUtils
type BrokerUtilsContext ¶ added in v0.12.0
type BrokerUtilsContext struct {
// contains filtered or unexported fields
}
type FakeServer ¶ added in v0.1.9
type FakeServer interface {
// contains filtered or unexported methods
}
type FlagValue ¶ added in v0.1.2
type FlagValue struct {
// contains filtered or unexported fields
}
type HTTPCouple ¶ added in v0.6.0
type HTTPCouple struct { Expectations *HTTPExpectations Reaction *HTTPReaction }
type HTTPExpectations ¶
type HTTPReaction ¶
type OAuthServer ¶
type OAuthServer struct { BaseURL string Router *mux.Router // 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) RotateTokenKey ¶ added in v0.11.0
func (os *OAuthServer) RotateTokenKey()
func (*OAuthServer) Start ¶
func (os *OAuthServer) Start()
func (*OAuthServer) TokenKeysRequestCallCount ¶ added in v0.11.0
func (os *OAuthServer) TokenKeysRequestCallCount() int
func (*OAuthServer) URL ¶
func (os *OAuthServer) URL() string
type OAuthTLSServer ¶ added in v0.21.0
type OAuthTLSServer struct { Server *httptest.Server Router *mux.Router // contains filtered or unexported fields }
func NewOAuthTLSServer ¶ added in v0.21.0
func NewOAuthTLSServer(serverCertificate, serverCertificateKey []byte, clientAuthType tls.ClientAuthType, clientCertificates ...[]byte) *OAuthTLSServer
func (*OAuthTLSServer) Close ¶ added in v0.21.0
func (os *OAuthTLSServer) Close()
func (*OAuthTLSServer) CreateToken ¶ added in v0.21.0
func (os *OAuthTLSServer) CreateToken(payload map[string]interface{}) string
func (*OAuthTLSServer) RotateTokenKey ¶ added in v0.21.0
func (os *OAuthTLSServer) RotateTokenKey()
func (*OAuthTLSServer) TokenKeysRequestCallCount ¶ added in v0.21.0
func (os *OAuthTLSServer) TokenKeysRequestCallCount() int
func (*OAuthTLSServer) URL ¶ added in v0.21.0
func (os *OAuthTLSServer) URL() string
type Object ¶
type Object = map[string]interface{}
func CopyFields ¶ added in v0.6.0
func CopyLabels ¶ added in v0.6.0
func CopyObject ¶ added in v0.1.8
func GenerateRandomBroker ¶ added in v0.1.8
func GenerateRandomBroker() Object
func GenerateRandomPlatform ¶ added in v0.1.8
func GenerateRandomPlatform() Object
func MakePlatform ¶
func RegisterBrokerInSM ¶ added in v0.1.2
func RemoveBooleanArgs ¶ added in v0.10.0
func RemoveNonJSONArgs ¶ added in v0.1.8
func RemoveNonNumericOrDateArgs ¶ added in v0.12.0
func RemoveNotNullableFieldAndLabels ¶ added in v0.1.8
func RemoveNumericAndDateArgs ¶ added in v0.12.0
type OperationExpectations ¶ added in v0.10.0
type OperationExpectations struct { Category types.OperationCategory State types.OperationState ResourceType types.ObjectType Reschedulable bool DeletionScheduled bool Error string }
type ResourceExpectations ¶ added in v0.10.0
type ResourceExpectations struct { ID string Type types.ObjectType Ready bool }
type SBCatalog ¶ added in v0.1.8
type SBCatalog string
func NewEmptySBCatalog ¶ added in v0.1.8
func NewEmptySBCatalog() SBCatalog
NewEmptySBCatalog returns an empty service broker catalog tha contains no services and no plans
func NewRandomSBCatalog ¶ added in v0.1.8
func NewRandomSBCatalog() SBCatalog
NewRandomSBCatalog returns a service broker catalog containg one random service with one free and one paid random plans
func NewShareableCatalog ¶ added in v0.19.5
NewRandomSBCatalog returns a service broker catalog containg one random service with one free and one paid random plans
func (*SBCatalog) AddPlanToService ¶ added in v0.1.8
func (*SBCatalog) AddService ¶ added in v0.1.8
func (*SBCatalog) RemovePlan ¶ added in v0.1.8
type SMExpect ¶ added in v0.6.0
type SMExpect struct {
*httpexpect.Expect
}
func (*SMExpect) ListWithQuery ¶ added in v0.6.0
func (expect *SMExpect) ListWithQuery(path string, query string) *httpexpect.Array
func (*SMExpect) SetBasicCredentials ¶ added in v0.11.0
func (expect *SMExpect) SetBasicCredentials(ctx *TestContext, username, password string)
type TestContext ¶
type TestContext struct { Config *config.Settings SM *SMExpect SMWithOAuth *SMExpect // Requests a token the the "multitenant" oauth client - then token issued by this client contains // the "multitenant" client id behind the specified token claim in the api config // the token also contains a "tenant identifier" behind the configured tenant_indentifier claim that // will be compared with the value of the label specified in the "label key" configuration // In the end requesting brokers with this SMWithOAuthForTenant *SMExpect SMWithBasic *SMExpect SMRepository storage.TransactionalRepository SMScheduler *operations.Scheduler TestPlatform *types.Platform TenantTokenProvider func() string TestContextData BrokerUtils Servers map[string]FakeServer HttpClient *http.Client Maintainer *operations.Maintainer // contains filtered or unexported fields }
func DefaultTestContext ¶ added in v0.1.9
func DefaultTestContext() *TestContext
DefaultTestContext sets up a test context with default values
func (*TestContext) Cleanup ¶
func (ctx *TestContext) Cleanup()
func (*TestContext) CleanupAdditionalResources ¶ added in v0.1.8
func (ctx *TestContext) CleanupAdditionalResources()
func (*TestContext) CleanupAll ¶ added in v0.10.0
func (ctx *TestContext) CleanupAll(cleanupResources bool)
func (*TestContext) CleanupBroker ¶
func (ctx *TestContext) CleanupBroker(id string)
func (*TestContext) CleanupPlatforms ¶ added in v0.10.0
func (ctx *TestContext) CleanupPlatforms()
func (*TestContext) CloseWebSocket ¶ added in v0.3.3
func (ctx *TestContext) CloseWebSocket(conn *websocket.Conn)
func (*TestContext) ConnectWebSocket ¶ added in v0.3.3
func (*TestContext) NewTenantExpect ¶ added in v0.10.0
func (ctx *TestContext) NewTenantExpect(clientID, tenantIdentifier string, scopes ...string) *SMExpect
func (*TestContext) RegisterBroker ¶
func (ctx *TestContext) RegisterBroker() *BrokerUtils
func (*TestContext) RegisterBrokerWithCatalog ¶ added in v0.1.6
func (ctx *TestContext) RegisterBrokerWithCatalog(catalog SBCatalog) *BrokerUtils
func (*TestContext) RegisterBrokerWithCatalogAndLabels ¶ added in v0.1.8
func (ctx *TestContext) RegisterBrokerWithCatalogAndLabels(catalog SBCatalog, brokerData Object, expectedStatus int) *BrokerUtils
func (*TestContext) RegisterBrokerWithCatalogAndLabelsExpect ¶ added in v0.4.2
func (ctx *TestContext) RegisterBrokerWithCatalogAndLabelsExpect(catalog SBCatalog, brokerData Object, expect *SMExpect, expectedStatus int) *BrokerUtils
func (*TestContext) RegisterBrokerWithRandomCatalogAndTLS ¶ added in v0.12.0
func (ctx *TestContext) RegisterBrokerWithRandomCatalogAndTLS(expect *SMExpect) *BrokerUtils
func (*TestContext) RegisterPlatform ¶ added in v0.1.6
func (ctx *TestContext) RegisterPlatform() *types.Platform
func (*TestContext) RegisterPlatformAndActivate ¶ added in v0.16.9
func (ctx *TestContext) RegisterPlatformAndActivate(activate bool) *types.Platform
func (*TestContext) RegisterPlatformWithType ¶ added in v0.10.0
func (ctx *TestContext) RegisterPlatformWithType(platformType string) *types.Platform
func (*TestContext) RegisterPlatformWithTypeAndActivate ¶ added in v0.16.9
func (ctx *TestContext) RegisterPlatformWithTypeAndActivate(platformType string, activate bool) *types.Platform
func (*TestContext) RegisterTenantPlatform ¶ added in v0.16.6
func (ctx *TestContext) RegisterTenantPlatform() *types.Platform
func (*TestContext) TryRegisterBrokerWithCatalogAndLabels ¶ added in v0.19.5
func (ctx *TestContext) TryRegisterBrokerWithCatalogAndLabels(catalog SBCatalog, brokerData Object, expect *SMExpect, expectedStatus int) (*BrokerServer, *BrokerServer, Object, Object)
type TestContextBuilder ¶ added in v0.1.9
type TestContextBuilder struct { Environment func(f ...func(set *pflag.FlagSet)) env.Environment Servers map[string]FakeServer HttpClient *http.Client // contains filtered or unexported fields }
func NewTestContextBuilder ¶ added in v0.1.9
func NewTestContextBuilder() *TestContextBuilder
NewTestContextBuilder sets up a builder with default values
func NewTestContextBuilderWithSecurity ¶ added in v0.9.7
func NewTestContextBuilderWithSecurity() *TestContextBuilder
func (*TestContextBuilder) Build ¶ added in v0.1.9
func (tcb *TestContextBuilder) Build() *TestContext
func (*TestContextBuilder) BuildWithCleanup ¶ added in v0.13.0
func (tcb *TestContextBuilder) BuildWithCleanup(shouldCleanup bool) *TestContext
func (*TestContextBuilder) BuildWithListener ¶ added in v0.4.1
func (tcb *TestContextBuilder) BuildWithListener(listener net.Listener, cleanup bool) *TestContext
func (*TestContextBuilder) BuildWithoutCleanup ¶ added in v0.10.0
func (tcb *TestContextBuilder) BuildWithoutCleanup() *TestContext
func (*TestContextBuilder) ShouldUseSeparateOAuthServerForTenantAccess ¶ added in v0.11.0
func (tcb *TestContextBuilder) ShouldUseSeparateOAuthServerForTenantAccess(use bool) *TestContextBuilder
func (*TestContextBuilder) SkipBasicAuthClientSetup ¶ added in v0.1.9
func (tcb *TestContextBuilder) SkipBasicAuthClientSetup(shouldSkip bool) *TestContextBuilder
func (*TestContextBuilder) WithAdditionalFakeServers ¶ added in v0.1.9
func (tcb *TestContextBuilder) WithAdditionalFakeServers(additionalFakeServers map[string]FakeServer) *TestContextBuilder
func (*TestContextBuilder) WithBasicAuthPlatformName ¶ added in v0.13.0
func (tcb *TestContextBuilder) WithBasicAuthPlatformName(name string) *TestContextBuilder
func (*TestContextBuilder) WithDefaultEnv ¶ added in v0.1.9
func (tcb *TestContextBuilder) WithDefaultEnv(envCreateFunc func(f ...func(set *pflag.FlagSet)) env.Environment) *TestContextBuilder
func (*TestContextBuilder) WithDefaultTokenClaims ¶ added in v0.1.9
func (tcb *TestContextBuilder) WithDefaultTokenClaims(defaultTokenClaims map[string]interface{}) *TestContextBuilder
func (*TestContextBuilder) WithEnvPostExtensions ¶ added in v0.1.9
func (tcb *TestContextBuilder) WithEnvPostExtensions(fs ...func(e env.Environment, servers map[string]FakeServer)) *TestContextBuilder
func (*TestContextBuilder) WithEnvPreExtensions ¶ added in v0.1.9
func (tcb *TestContextBuilder) WithEnvPreExtensions(fs ...func(set *pflag.FlagSet)) *TestContextBuilder
func (*TestContextBuilder) WithSMExtensions ¶ added in v0.1.9
func (tcb *TestContextBuilder) WithSMExtensions(fs ...func(ctx context.Context, smb *sm.ServiceManagerBuilder, e env.Environment) error) *TestContextBuilder
func (*TestContextBuilder) WithTenantTokenClaims ¶ added in v0.4.1
func (tcb *TestContextBuilder) WithTenantTokenClaims(tenantTokenClaims map[string]interface{}) *TestContextBuilder
type TransitiveResourcesExpectation ¶ added in v0.12.0
Click to show internal directories.
Click to hide internal directories.