Documentation ¶
Index ¶
- func CreateFailWriter(writeLimit int) io.WriteCloser
- func JSONRespondMust(code int, response interface{}) httpmock.Responder
- func TestConfigGetEnumsCount(config types.ServiceConfig, expectedCount int)
- func TestConfigGetFieldsCount(config types.ServiceConfig, expectedCount int)
- func TestConfigGetInvalidQueryValue(config types.ServiceConfig)
- func TestConfigSetDefaultValues(config types.ServiceConfig)
- func TestConfigSetInvalidQueryValue(config types.ServiceConfig, rawInvalidURL string)
- func TestLogger() *log.Logger
- func TestServiceSetInvalidParamValue(service types.Service, key string, value string)
- func URLMust(rawURL string) *url.URL
- type Eavesdropper
- type MockClientService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFailWriter ¶
func CreateFailWriter(writeLimit int) io.WriteCloser
CreateFailWriter returns a io.WriteCloser that returns an error after the amount of writes indicated by writeLimit
func JSONRespondMust ¶ added in v0.6.0
JSONRespondMust creates a httpmock.Responder with the given response as the body, and fails the test if it cannot be created
func TestConfigGetEnumsCount ¶
func TestConfigGetEnumsCount(config types.ServiceConfig, expectedCount int)
TestConfigGetEnumsCount tests whether the config.Enums returns the expected amount of items
func TestConfigGetFieldsCount ¶
func TestConfigGetFieldsCount(config types.ServiceConfig, expectedCount int)
TestConfigGetFieldsCount tests whether the config.QueryFields return the expected amount of fields
func TestConfigGetInvalidQueryValue ¶
func TestConfigGetInvalidQueryValue(config types.ServiceConfig)
TestConfigGetInvalidQueryValue tests whether the config returns an error when an invalid query value is requested
func TestConfigSetDefaultValues ¶ added in v0.6.0
func TestConfigSetDefaultValues(config types.ServiceConfig)
TestConfigSetDefaultValues tests whether setting the default values can be set for an empty config without any errors
func TestConfigSetInvalidQueryValue ¶
func TestConfigSetInvalidQueryValue(config types.ServiceConfig, rawInvalidURL string)
TestConfigSetInvalidQueryValue tests whether the config returns an error when a URL with an invalid query value is parsed
func TestLogger ¶ added in v0.6.0
TestLogger returns a log.Logger that writes to ginkgo.GinkgoWriter for use in tests
func TestServiceSetInvalidParamValue ¶ added in v0.6.0
TestServiceSetInvalidParamValue tests whether the service returns an error when an invalid param key/value is passed through Send
Types ¶
type Eavesdropper ¶
Eavesdropper is an interface that provides a way to get a summarized output of a connection RX and TX
func CreateTextConFaker ¶
func CreateTextConFaker(responses []string, delim string) (*textproto.Conn, Eavesdropper)
CreateTextConFaker returns a textproto.Conn to fake textproto based connections
type MockClientService ¶ added in v0.6.0
MockClientService is used to allow mocking the HTTP client when testing