File tree Expand file tree Collapse file tree 7 files changed +30
-2
lines changed
test/java/dev/knative/eventing/connector
aws-s3-sink/src/main/resources/camel
test/java/dev/knative/eventing/connector
aws-sqs-sink/src/main/resources/camel
log-sink/src/main/resources/camel Expand file tree Collapse file tree 7 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 2727 name : default
2828 properties :
2929 type : " "
30+ dataTypes :
31+ out :
32+ scheme : http
33+ format : application/cloudevents
3034 sink :
3135 ref :
3236 kind : Kamelet
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ public void shouldConsumeEvents() {
8484 .body (eventData )
8585 .header ("ce-id" , "citrus:randomPattern([0-9A-Z]{15}-[0-9]{16})@" )
8686 .header ("ce-type" , "dev.knative.eventing.aws.eventbridge" )
87- .header ("ce-source" , "dev.knative.eventing. aws-eventbridge-source " )
87+ .header ("ce-source" , "aws.s3 " )
8888 .header ("ce-subject" , "aws-eventbridge-source" )
8989 );
9090
Original file line number Diff line number Diff line change 2727 name : default
2828 properties :
2929 type : " "
30+ dataTypes :
31+ out :
32+ scheme : http
33+ format : application/cloudevents
3034 sink :
3135 ref :
3236 kind : Kamelet
Original file line number Diff line number Diff line change 2727 name : default
2828 properties :
2929 type : " "
30+ dataTypes :
31+ out :
32+ scheme : http
33+ format : application/cloudevents
3034 sink :
3135 ref :
3236 kind : Kamelet
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ public void shouldConsumeEvents() {
8181 .header ("ce-type" , "dev.knative.eventing.aws.sns" )
8282 .header ("ce-source" , "dev.knative.eventing.aws-sns-source" )
8383 .header ("ce-subject" , "aws-sns-source" )
84+ .header ("ce-apiVersion" , "v1" )
8485 );
8586
8687 tc .when (
@@ -110,7 +111,14 @@ private void verifySnsData(TestContext context) {
110111
111112 try {
112113 Assertions .assertEquals (1 , receiveMessageResponse .messages ().size ());
113- Assertions .assertTrue (receiveMessageResponse .messages ().get (0 ).body ().contains (snsData ));
114+ String body = receiveMessageResponse .messages ().getFirst ().body ();
115+ Assertions .assertTrue (body .contains ("\" Message\" : \" %s\" " .formatted (snsData )));
116+ Assertions .assertTrue (body .contains ("\" Subject\" : \" aws-sns-source\" " ));
117+ Assertions .assertTrue (body .contains ("ce-id" ));
118+ Assertions .assertTrue (body .contains ("ce-type" ));
119+ Assertions .assertTrue (body .contains ("ce-source" ));
120+ Assertions .assertTrue (body .contains ("ce-subject" ));
121+ Assertions .assertTrue (body .contains ("ce-apiVersion" ));
114122 } catch (AssertionFailedError error ) {
115123 throw new CitrusRuntimeException ("SNS data verification failed" , error );
116124 }
Original file line number Diff line number Diff line change 2727 name : default
2828 properties :
2929 type : " "
30+ dataTypes :
31+ out :
32+ scheme : http
33+ format : application/cloudevents
3034 sink :
3135 ref :
3236 kind : Kamelet
Original file line number Diff line number Diff line change 2727 name : default
2828 properties :
2929 type : " "
30+ dataTypes :
31+ out :
32+ scheme : http
33+ format : application/cloudevents
3034 sink :
3135 ref :
3236 kind : Kamelet
You can’t perform that action at this time.
0 commit comments