Documentation
¶
Index ¶
- Constants
- func AssertExpectedError(t *testing.T, body []byte, actualStatusCode int, expectedStatusCode int, ...)
- func BuildDefaultTestBadPayload() string
- func BuildDefaultTestPayload() string
- func BuildDefaultTestPayloadWithEmptyData() string
- func BuildDefaultTestPayloadWithoutData() string
- func BuildDefaultTestPayloadWithoutEventTime() string
- func BuildDefaultTestPayloadWithoutEventType() string
- func BuildDefaultTestPayloadWithoutEventTypeVersion() string
- func BuildDefaultTestPayloadWithoutSourceID() string
- func BuildTestPayload(sourceID, eventType, eventTypeVersion, eventID, eventTime, data string) string
- func PerformPublishV1Request(t *testing.T, publishURL string, payload string) ([]byte, int)
- func PerformPublishV1RequestWithHeaders(t *testing.T, publishURL string, payload string, headers map[string]string) ([]byte, int)
- func PerformPublishV2RequestWithHeaders(t *testing.T, publishURL string, payload string, headers map[string]string) ([]byte, int)
Constants ¶
const ( // TestSourceID used in the tests TestSourceID = "test-source-id" // TestEventType used in the tests TestEventType = "test-event-type" // TestEventTypeVersion used in the tests TestEventTypeVersion = "v1" // TestEventTypeVersionInvalid used in the tests TestEventTypeVersionInvalid = "#" // TestEventTime used in the tests TestEventTime = "2012-11-01T22:08:41+00:00" // TestEventTimeInvalid used in the tests TestEventTimeInvalid = "2012-11-01T22" // TestEventID used in the tests TestEventID = "4ea567cf-812b-49d9-a4b2-cb5ddf464094" // TestEventIDInvalid used in the tests TestEventIDInvalid = "4ea567cf" // TestSourceIDInvalid used in the tests TestSourceIDInvalid = "source/Id" // TestData used in the tests TestData = "{'key':'value'}" // TestDataEmpty used in the tests TestDataEmpty = "" )
Variables ¶
This section is empty.
Functions ¶
func AssertExpectedError ¶
func AssertExpectedError(t *testing.T, body []byte, actualStatusCode int, expectedStatusCode int, errorField interface{}, errorType interface{})
AssertExpectedError asserts an expected status-code and error.
func BuildDefaultTestBadPayload ¶
func BuildDefaultTestBadPayload() string
BuildDefaultTestBadPayload returns a default test bad payload.
func BuildDefaultTestPayload ¶
func BuildDefaultTestPayload() string
BuildDefaultTestPayload returns a default test payload.
func BuildDefaultTestPayloadWithEmptyData ¶
func BuildDefaultTestPayloadWithEmptyData() string
BuildDefaultTestPayloadWithEmptyData returns a default test payload with empty data
func BuildDefaultTestPayloadWithoutData ¶
func BuildDefaultTestPayloadWithoutData() string
BuildDefaultTestPayloadWithoutData returns a default test payload without the data
func BuildDefaultTestPayloadWithoutEventTime ¶
func BuildDefaultTestPayloadWithoutEventTime() string
BuildDefaultTestPayloadWithoutEventTime returns a default test payload without the event-time
func BuildDefaultTestPayloadWithoutEventType ¶
func BuildDefaultTestPayloadWithoutEventType() string
BuildDefaultTestPayloadWithoutEventType returns a default test payload without the event-type.
func BuildDefaultTestPayloadWithoutEventTypeVersion ¶
func BuildDefaultTestPayloadWithoutEventTypeVersion() string
BuildDefaultTestPayloadWithoutEventTypeVersion returns a default test payload without the event-type-version.
func BuildDefaultTestPayloadWithoutSourceID ¶
func BuildDefaultTestPayloadWithoutSourceID() string
BuildDefaultTestPayloadWithoutSourceID returns a default test payload without the source-id.
func BuildTestPayload ¶
func BuildTestPayload(sourceID, eventType, eventTypeVersion, eventID, eventTime, data string) string
BuildTestPayload returns a test payload.
func PerformPublishV1Request ¶
PerformPublishV1Request performs a test publish request.
Types ¶
This section is empty.