Documentation
¶
Index ¶
- Constants
- func ClearReceivedRequests(code *int, response interface{}, server *ghttp.Server)
- func Closer(s string) io.ReadCloser
- func DoHTTP(reaction *HTTPReaction, checks *HTTPExpectations) func(*http.Request) (*http.Response, error)
- func FakeBrokerServer(code *int, response interface{}) *ghttp.Server
- func LoadEnvironment(confgiFileDir string) env.Environment
- func MapContains(actual Object, expected Object)
- func RegisterBroker(brokerJSON Object, SM *httpexpect.Expect) string
- func RegisterPlatform(platformJSON Object, SM *httpexpect.Expect) *types.Platform
- func RemoveAllBrokers(SM *httpexpect.Expect)
- func RemoveAllPlatforms(SM *httpexpect.Expect)
- func SetupFakeFailingBrokerServer(brokerID string) *httptest.Server
- func SetupFakeServiceBrokerServer(brokerID string) *httptest.Server
- func SetupFakeServiceBrokerServerWithPrefix(brokerID, prefix string) *httptest.Server
- func VerifyBrokerCatalogEndpointInvoked(server *ghttp.Server, times int)
- func VerifyReqReceived(server *ghttp.Server, times int, method, path string, rawQuery ...string)
- type Array
- type Broker
- type ContextParams
- type HTTPExpectations
- type HTTPReaction
- type NopCloser
- type OAuthServer
- type Object
- type TestContext
Constants ¶
View Source
const Catalog = `` /* 740-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ClearReceivedRequests ¶
func Closer ¶
func Closer(s string) io.ReadCloser
func DoHTTP ¶
func DoHTTP(reaction *HTTPReaction, checks *HTTPExpectations) func(*http.Request) (*http.Response, error)
func FakeBrokerServer ¶
func LoadEnvironment ¶
func LoadEnvironment(confgiFileDir string) env.Environment
func MapContains ¶
func RegisterBroker ¶
func RegisterBroker(brokerJSON Object, SM *httpexpect.Expect) string
func RegisterPlatform ¶
func RegisterPlatform(platformJSON Object, SM *httpexpect.Expect) *types.Platform
func RemoveAllBrokers ¶
func RemoveAllBrokers(SM *httpexpect.Expect)
func RemoveAllPlatforms ¶
func RemoveAllPlatforms(SM *httpexpect.Expect)
Types ¶
type Broker ¶
type ContextParams ¶
type ContextParams struct {
Environment env.Environment
RegisterExtensions func(api *web.API)
DefaultTokenClaims map[string]interface{}
}
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
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(name string)
func (*TestContext) RegisterBroker ¶
func (ctx *TestContext) RegisterBroker(name string, server *httptest.Server) *Broker
Click to show internal directories.
Click to hide internal directories.