Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camel-knative: set CloudEvents v0.2 as default spec version #25

Merged
merged 1 commit into from
Mar 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class KnativeConfiguration implements Cloneable {
@UriParam(defaultValue = "false")
private boolean jsonSerializationEnabled;

@UriParam(defaultValue = "0.1", enums = "0.1,0.2")
private String cloudEventsSpecVersion = "0.1";
@UriParam(defaultValue = "0.2", enums = "0.1,0.2")
private String cloudEventsSpecVersion = "0.2";

public KnativeConfiguration() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.cloud.ServiceDefinition;
import org.apache.camel.component.knative.ce.CloudEventsProcessors;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.netty4.NettyEndpoint;
import org.apache.camel.component.properties.PropertiesComponent;
Expand Down Expand Up @@ -331,6 +332,7 @@ void testInvokeEndpoint() throws Exception {
));

KnativeComponent component = context.getComponent("knative", KnativeComponent.class);
component.setCloudEventsSpecVersion(CloudEventsProcessors.v01.getVersion());
component.setEnvironment(env);

context.addRoutes(new RouteBuilder() {
Expand Down Expand Up @@ -385,6 +387,7 @@ void testConsumeStructuredContent() throws Exception {
));

KnativeComponent component = context.getComponent("knative", KnativeComponent.class);
component.setCloudEventsSpecVersion(CloudEventsProcessors.v01.getVersion());
component.setEnvironment(env);

context.addRoutes(new RouteBuilder() {
Expand Down Expand Up @@ -448,6 +451,7 @@ void testConsumeContent() throws Exception {
));

KnativeComponent component = context.getComponent("knative", KnativeComponent.class);
component.setCloudEventsSpecVersion(CloudEventsProcessors.v01.getVersion());
component.setEnvironment(env);

context.addRoutes(new RouteBuilder() {
Expand Down Expand Up @@ -521,6 +525,7 @@ void testConsumeContentWithFilter() throws Exception {
));

KnativeComponent component = context.getComponent("knative", KnativeComponent.class);
component.setCloudEventsSpecVersion(CloudEventsProcessors.v01.getVersion());
component.setEnvironment(env);

context.addRoutes(new RouteBuilder() {
Expand Down