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 BuildDefaultTestSubject() string
- func BuildDefaultTestSubjectAndPayload() (string, string)
- func BuildTestPayload(sourceID, eventType, eventTypeVersion, eventID, eventTime, data string) string
- func Logger(h http.Handler) http.Handler
- func NewEventActivation(name string, namespace string, sourceID string) *eaApis.EventActivation
- func NewSubscriberDeployment(sbscrImg string) *appsv1.Deployment
- func NewSubscriberServerV1() *httptest.Server
- func NewSubscriberServerV2() *httptest.Server
- func NewSubscriberServerWithPort(port int, stop chan bool) *http.Server
- func NewSubscriberService() *apiv1.Service
- func NewSubscription(name string, namespace string, subscriberEventEndpointURL string, ...) *apiv1.Subscription
- func PerformPublishRequest(t *testing.T, publishURL string, payload string) ([]byte, int)
- func PerformPublishRequestWithHeaders(t *testing.T, publishURL string, payload string, headers map[string]string) ([]byte, int)
- func VerifyReceivedMsg(t *testing.T, a string, b []byte)
Constants ¶
View Source
const ( // publish request TestSourceID = "test-source-id" TestSourceIDInHeader = "test-source-id-in-header" TestEventType = "test-event-type" TestEventTypeVersion = "v1" TestEventTypeVersionInvalid = "#" TestEventTime = "2012-11-01T22:08:41+00:00" TestEventTimeInvalid = "2012-11-01T22" TestEventID = "4ea567cf-812b-49d9-a4b2-cb5ddf464094" TestEventIDInvalid = "4ea567cf" TestSourceIdInvalid = "invalid/sourceId" TestData = "{'key':'value'}" TestDataEmpty = "" )
View Source
const ( SubServer1EventsPath = "/v1/events" SubServer1StatusPath = "/v1/status" SubServer1ResultsPath = "/v1/results" SubServer2EventsPath = "/v2/events" SubServer2StatusPath = "/v2/status" SubServer2ResultsPath = "/v2/results" )
Subscribers Servers API paths
View Source
const (
SubscriberName = "test-core-event-bus-subscriber"
)
Variables ¶
This section is empty.
Functions ¶
func AssertExpectedError ¶
func BuildDefaultTestBadPayload ¶
func BuildDefaultTestBadPayload() string
func BuildDefaultTestPayload ¶
func BuildDefaultTestPayload() string
func BuildDefaultTestPayloadWithEmptyData ¶
func BuildDefaultTestPayloadWithEmptyData() string
func BuildDefaultTestPayloadWithoutData ¶
func BuildDefaultTestPayloadWithoutData() string
func BuildDefaultTestPayloadWithoutEventTime ¶
func BuildDefaultTestPayloadWithoutEventTime() string
func BuildDefaultTestPayloadWithoutEventType ¶
func BuildDefaultTestPayloadWithoutEventType() string
func BuildDefaultTestPayloadWithoutEventTypeVersion ¶
func BuildDefaultTestPayloadWithoutEventTypeVersion() string
func BuildDefaultTestPayloadWithoutSourceId ¶
func BuildDefaultTestPayloadWithoutSourceId() string
func BuildDefaultTestSubject ¶
func BuildDefaultTestSubject() string
func BuildTestPayload ¶
func NewEventActivation ¶
func NewEventActivation(name string, namespace string, sourceID string) *eaApis.EventActivation
NewEventActivation creates a new event activation
func NewSubscriberDeployment ¶
func NewSubscriberDeployment(sbscrImg string) *appsv1.Deployment
func NewSubscriberServerV1 ¶
NewSubscriberServerV1 ...
func NewSubscriberServerV2 ¶
NewSubscriberServerV2 ...
func NewSubscriberServerWithPort ¶
NewSubscriberServerWithPort ...
func NewSubscriberService ¶
func NewSubscription ¶
func NewSubscription(name string, namespace string, subscriberEventEndpointURL string, eventType string, eventTypeVersion string, sourceID string) *apiv1.Subscription
NewSubscription creates a new subscription
func PerformPublishRequest ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.