Documentation ¶
Index ¶
- Constants
- func TestEnv() env.Environment
- type ConfigRequestBody
- type FakeServer
- type GqlFakeRouter
- type GqlFakeServer
- type GraphqlQueryKey
- type TestContext
- type TestContextBuilder
- func (tcb *TestContextBuilder) Build(t *testing.T) *TestContext
- func (tcb *TestContextBuilder) WithDefaultEnv(env env.Environment) *TestContextBuilder
- func (tcb *TestContextBuilder) WithEnvExtensions(fs ...func(e env.Environment, servers map[string]FakeServer)) *TestContextBuilder
- func (tcb *TestContextBuilder) WithHttpClient(client *http.Client) *TestContextBuilder
Constants ¶
View Source
const DirectorServer = "director-server"
View Source
const SystemBrokerServer = "system-broker-server"
Variables ¶
This section is empty.
Functions ¶
func TestEnv ¶
func TestEnv() env.Environment
Types ¶
type ConfigRequestBody ¶
type ConfigRequestBody struct { GraphqlQueryKey Response interface{} }
type FakeServer ¶
type FakeServer interface {
// contains filtered or unexported methods
}
type GqlFakeRouter ¶
type GqlFakeRouter struct { ResponseConfig map[GraphqlQueryKey][]interface{} Schema *ast.Schema // contains filtered or unexported fields }
func NewGqlFakeRouter ¶
func NewGqlFakeRouter(schemaName, path string) (*GqlFakeRouter, error)
func (*GqlFakeRouter) Handler ¶
func (g *GqlFakeRouter) Handler() http.Handler
type GqlFakeServer ¶
type GqlFakeServer struct {
// contains filtered or unexported fields
}
func NewGqlFakeServer ¶
func NewGqlFakeServer(h http.Handler) *GqlFakeServer
func (*GqlFakeServer) Close ¶
func (g *GqlFakeServer) Close()
func (*GqlFakeServer) URL ¶
func (g *GqlFakeServer) URL() string
type GraphqlQueryKey ¶
type TestContext ¶
type TestContext struct { SystemBroker *httpexpect.Expect HttpClient *http.Client Servers map[string]FakeServer }
func (*TestContext) CleanUp ¶
func (tc *TestContext) CleanUp()
func (*TestContext) ConfigureResponse ¶
func (tc *TestContext) ConfigureResponse(configURL, queryType, queryName, response string) error
type TestContextBuilder ¶
type TestContextBuilder struct { Environment env.Environment Servers map[string]FakeServer HttpClient *http.Client // contains filtered or unexported fields }
func NewTestContextBuilder ¶
func NewTestContextBuilder() *TestContextBuilder
NewTestContextBuilder sets up a builder with default values
func (*TestContextBuilder) Build ¶
func (tcb *TestContextBuilder) Build(t *testing.T) *TestContext
func (*TestContextBuilder) WithDefaultEnv ¶
func (tcb *TestContextBuilder) WithDefaultEnv(env env.Environment) *TestContextBuilder
func (*TestContextBuilder) WithEnvExtensions ¶
func (tcb *TestContextBuilder) WithEnvExtensions(fs ...func(e env.Environment, servers map[string]FakeServer)) *TestContextBuilder
func (*TestContextBuilder) WithHttpClient ¶
func (tcb *TestContextBuilder) WithHttpClient(client *http.Client) *TestContextBuilder
Click to show internal directories.
Click to hide internal directories.