This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit f6c2424908d3147424a25e134a88035ec5f8f5d1
Author: Christoph Deppisch <cdeppi...@redhat.com>
AuthorDate: Wed Nov 30 17:45:51 2022 +0100

    Fix Knative YAKS tests
---
 test/aws-s3/aws-s3-cloudevents.feature     |  3 +-
 test/aws-s3/aws-s3-knative-binding.feature | 12 ++++----
 test/aws-s3/aws-s3-knative.feature         |  1 +
 test/aws-s3/aws-s3-to-knative-channel.yaml | 46 ++++++++++++++++++++++++++++++
 test/aws-s3/yaks-config.yaml               |  1 +
 5 files changed, 56 insertions(+), 7 deletions(-)

diff --git a/test/aws-s3/aws-s3-cloudevents.feature 
b/test/aws-s3/aws-s3-cloudevents.feature
index 52ac84c5..5774b738 100644
--- a/test/aws-s3/aws-s3-cloudevents.feature
+++ b/test/aws-s3/aws-s3-cloudevents.feature
@@ -1,3 +1,4 @@
+@knative
 Feature: AWS S3 Kamelet - cloud events data type
 
   Background:
@@ -34,7 +35,7 @@ Feature: AWS S3 Kamelet - cloud events data type
   Scenario: Verify Kamelet source
     Given create Knative event consumer service event-consumer-service
     Given create Knative trigger event-service-trigger on service 
event-consumer-service with filter on attributes
-      | type   | kamelet.aws.s3.source |
+      | type   | org.apache.camel.event.aws.s3.getObject |
     Given Camel exchange message header CamelAwsS3Key="${aws.s3.key}"
     Given send Camel exchange 
to("aws2-s3://${aws.s3.bucketNameOrArn}?amazonS3Client=#amazonS3Client") with 
body: ${aws.s3.message}
     Then expect Knative event data: ${aws.s3.message}
diff --git a/test/aws-s3/aws-s3-knative-binding.feature 
b/test/aws-s3/aws-s3-knative-binding.feature
index e94ab715..cf67b4c9 100644
--- a/test/aws-s3/aws-s3-knative-binding.feature
+++ b/test/aws-s3/aws-s3-knative-binding.feature
@@ -1,5 +1,5 @@
 @knative
-Feature: AWS S3 Kamelet - binding to Knative
+Feature: AWS S3 Kamelet - binding to Knative channel
 
   Background:
     Given Kamelet aws-s3-source is available
@@ -24,13 +24,13 @@ Feature: AWS S3 Kamelet - binding to Knative
 
   Scenario: Create AWS-S3 Kamelet to InMemoryChannel binding
     Given variable loginfo is "Installed features"
-    Given load KameletBinding aws-s3-to-knative.yaml
+    Given load KameletBinding aws-s3-to-knative-channel.yaml
     Given load KameletBinding knative-channel-to-log.yaml
-    Then KameletBinding aws-s3-to-knative should be available
+    Then KameletBinding aws-s3-to-knative-channel should be available
     And KameletBinding knative-channel-to-log should be available
-    And Camel K integration aws-s3-to-knative is running
+    And Camel K integration aws-s3-to-knative-channel is running
     And Camel K integration knative-channel-to-log is running
-    And Camel K integration aws-s3-to-knative should print ${loginfo}
+    And Camel K integration aws-s3-to-knative-channel should print ${loginfo}
     And Camel K integration knative-channel-to-log should print ${loginfo}
     Then sleep 10000 ms
 
@@ -40,7 +40,7 @@ Feature: AWS S3 Kamelet - binding to Knative
     Then Camel K integration knative-channel-to-log should print 
${aws.s3.message}
 
   Scenario: Remove resources
-    Given delete KameletBinding aws-s3-to-knative
+    Given delete KameletBinding aws-s3-to-knative-channel
     Given delete KameletBinding knative-channel-to-log
     Given delete Knative broker default
     Given delete Knative channel messages
diff --git a/test/aws-s3/aws-s3-knative.feature 
b/test/aws-s3/aws-s3-knative.feature
index fe080fa2..dc358797 100644
--- a/test/aws-s3/aws-s3-knative.feature
+++ b/test/aws-s3/aws-s3-knative.feature
@@ -1,3 +1,4 @@
+@knative
 Feature: AWS S3 Kamelet - Knative binding
 
   Background:
diff --git a/test/aws-s3/aws-s3-to-knative-channel.yaml 
b/test/aws-s3/aws-s3-to-knative-channel.yaml
new file mode 100644
index 00000000..5383ae61
--- /dev/null
+++ b/test/aws-s3/aws-s3-to-knative-channel.yaml
@@ -0,0 +1,46 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: aws-s3-to-knative-channel
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: aws-s3-source
+    properties:
+      bucketNameOrArn: ${aws.s3.bucketNameOrArn}
+      overrideEndpoint: true
+      uriEndpointOverride: ${YAKS_TESTCONTAINERS_LOCALSTACK_S3_URL}
+      accessKey: ${YAKS_TESTCONTAINERS_LOCALSTACK_ACCESS_KEY}
+      secretKey: ${YAKS_TESTCONTAINERS_LOCALSTACK_SECRET_KEY}
+      region: ${YAKS_TESTCONTAINERS_LOCALSTACK_REGION}
+  steps:
+    - ref:
+        kind: Kamelet
+        apiVersion: camel.apache.org/v1alpha1
+        name: log-sink
+      properties:
+        showHeaders: true
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: messages
diff --git a/test/aws-s3/yaks-config.yaml b/test/aws-s3/yaks-config.yaml
index 4ef910c4..6f1a0d0d 100644
--- a/test/aws-s3/yaks-config.yaml
+++ b/test/aws-s3/yaks-config.yaml
@@ -43,6 +43,7 @@ config:
       - aws-s3-to-log-secret-based.groovy
       - aws-s3-uri-binding.yaml
       - aws-s3-to-knative.yaml
+      - aws-s3-to-knative-channel.yaml
       - ../utils/knative-channel-to-log.yaml
     cucumber:
       tags:

Reply via email to