From fe132e9df2afd59f53de8642b941760ee27ecd80 Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Thu, 17 Aug 2023 15:11:37 +0200 Subject: [PATCH] fix: Fix Kamelet unit tests --- .../yaks/camelk/KameletBuilderTest.java | 1 + .../org/citrusframework/yaks/camelk/kamelet.json | 11 +++++++---- .../src/test/resources/timer-source.kamelet.json | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java index 8a604c4a..0b72665f 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java @@ -49,6 +49,7 @@ public void buildComplexKamelet() throws IOException { Kamelet kamelet = new Kamelet.Builder() .name("time-source") + .addLabel(KameletSettings.KAMELET_TYPE_LABEL, "source") .definition(definition) .dataTypes(dataTypes) .dependencies(Collections.singletonList("mvn:fake.dependency:id:version-1")) diff --git a/java/steps/yaks-camel-k/src/test/resources/org/citrusframework/yaks/camelk/kamelet.json b/java/steps/yaks-camel-k/src/test/resources/org/citrusframework/yaks/camelk/kamelet.json index 9103c810..09f4d1fd 100644 --- a/java/steps/yaks-camel-k/src/test/resources/org/citrusframework/yaks/camelk/kamelet.json +++ b/java/steps/yaks-camel-k/src/test/resources/org/citrusframework/yaks/camelk/kamelet.json @@ -2,6 +2,9 @@ "apiVersion": "camel.apache.org/v1", "kind": "Kamelet", "metadata": { + "labels": { + "camel.apache.org/kamelet.type": "source" + }, "name": "time-source" }, "spec": { @@ -26,16 +29,16 @@ "dataTypes": { "out": { "default": "text", - "types": [ - { + "types": { + "binary": { "scheme": "camel", "format": "binary" }, - { + "text": { "scheme": "camel", "format": "text" } - ] + } } }, "dependencies": [ diff --git a/java/steps/yaks-camel-k/src/test/resources/timer-source.kamelet.json b/java/steps/yaks-camel-k/src/test/resources/timer-source.kamelet.json index 93922fd1..d0b87a0c 100644 --- a/java/steps/yaks-camel-k/src/test/resources/timer-source.kamelet.json +++ b/java/steps/yaks-camel-k/src/test/resources/timer-source.kamelet.json @@ -38,12 +38,12 @@ "dataTypes": { "out": { "default": "text", - "types": [ - { + "types": { + "text": { "format": "text", "mediaType": "text/plain" } - ] + } } }, "template": {