This is an automated email from the ASF dual-hosted git repository. cdeppisch pushed a commit to branch 4.8.x in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 3939a347f614b44d04111ed5f02754c01d9565c9 Author: Christoph Deppisch <[email protected]> AuthorDate: Tue Sep 17 10:34:21 2024 +0200 chore: Fix YAKS tests - Use Camel 4.8.0 and latest Kamelets SNAPSHOT version - Update YAKS to 0.20.0 - Update Citrus to 4.3.2 - Fix Kafka tests to use proper username/password (cherry picked from commit d4433cca8b2c1c6cbaf743978a251055c9021b08) --- pom.xml | 6 +- .../test/resources/aws/ddb/aws-ddb-sink.feature | 1 + .../test/resources/aws/ddb/aws-ddb-source.feature | 1 + .../resources/aws/ddb/waitForLocalStack.groovy | 20 ++++++ .../src/test/resources/aws/ddb/yaks-config.yaml | 1 + .../resources/aws/kinesis/aws-kinesis-sink.feature | 1 + .../aws/kinesis/aws-kinesis-source.feature | 1 + .../resources/aws/kinesis/waitForLocalStack.groovy | 20 ++++++ .../test/resources/aws/kinesis/yaks-config.yaml | 1 + .../test/resources/aws/s3/aws-s3-http-pipe.feature | 1 + .../resources/aws/s3/aws-s3-knative-broker.feature | 1 + .../aws/s3/aws-s3-knative-channel.feature | 1 + .../aws/s3/aws-s3-knative-cloudevents.feature | 1 + .../aws/s3/aws-s3-source-property-conf.feature | 1 + .../aws/s3/aws-s3-source-secret-conf.feature | 1 + .../aws/s3/aws-s3-source-uri-conf.feature | 1 + .../test/resources/aws/s3/aws-s3-uri-pipe.feature | 1 + .../test/resources/aws/s3/waitForLocalStack.groovy | 20 ++++++ .../src/test/resources/aws/s3/yaks-config.yaml | 1 + .../aws/sqs/aws-sqs-knative-channel.feature | 1 + .../aws/sqs/aws-sqs-source-property-conf.feature | 1 + .../aws/sqs/aws-sqs-source-secret-conf.feature | 1 + .../aws/sqs/aws-sqs-source-uri-conf.feature | 1 + .../resources/aws/sqs/aws-sqs-uri-pipe.feature | 1 + .../resources/aws/sqs/waitForLocalStack.groovy | 20 ++++++ .../src/test/resources/aws/sqs/yaks-config.yaml | 1 + .../test/resources/citrus-application.properties | 4 +- .../src/test/resources/kafka/kafka-sink.feature | 4 +- .../src/test/resources/kafka/kafka-source.feature | 4 +- .../test/resources/kafka/timestamp-router.feature | 14 ++-- .../src/test/resources/slack/slack-auth-test.json | 8 +++ .../slack/slack-conversations-history.json | 16 +++++ .../resources/slack/slack-conversations-list.json | 42 ++++++++++++ .../src/test/resources/slack/slack-source.feature | 78 +--------------------- .../src/test/resources/slack/yaks-config.yaml | 3 + 35 files changed, 189 insertions(+), 91 deletions(-) diff --git a/pom.xml b/pom.xml index 8513cf63..5ce3a0a0 100644 --- a/pom.xml +++ b/pom.xml @@ -65,9 +65,9 @@ <camel.version>4.8.0</camel.version> <camel.k.crds.version>2.4.0</camel.k.crds.version> - <citrus.version>4.2.0</citrus.version> - <cucumber.version>7.17.0</cucumber.version> - <yaks.version>0.19.1</yaks.version> + <citrus.version>4.3.2</citrus.version> + <cucumber.version>7.18.1</cucumber.version> + <yaks.version>0.20.0</yaks.version> <!-- Versions used inside Kamelets (add them also to the dependencyManagement section and the groovy script below) --> <!-- These properties must keep this same format "version.<groupId>.<artifactId>" --> diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink.feature b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink.feature index acf300dc..50df8a53 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink.feature @@ -28,6 +28,7 @@ Feature: AWS DDB Sink # Start LocalStack container Given Enable service DYNAMODB Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Create AWS DDB client # Create AWS-DDB client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.feature b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.feature index 8a43b0fa..e6580dc4 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.feature @@ -31,6 +31,7 @@ Feature: AWS DDB Source # Start LocalStack container Given Enable service DYNAMODB Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-DDB Kamelet source binding # Create AWS-DDB client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/waitForLocalStack.groovy b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/waitForLocalStack.groovy new file mode 100644 index 00000000..0fbee966 --- /dev/null +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/waitForLocalStack.groovy @@ -0,0 +1,20 @@ +/* + * 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. + */ + +package aws.ddb + +$(waitFor().seconds(15.0).http().url("${YAKS_TESTCONTAINERS_LOCALSTACK_DYNAMODB_LOCAL_URL}")) diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/yaks-config.yaml b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/yaks-config.yaml index c3c2a998..c4893679 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/yaks-config.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/yaks-config.yaml @@ -41,6 +41,7 @@ config: - amazonDDBClient.groovy - aws-ddb-sink-pipe.yaml - aws-ddb-source-pipe.yaml + - waitForLocalStack.yaml cucumber: tags: - "not @ignored" diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.feature b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.feature index b1d64f83..e563b26b 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.feature @@ -29,6 +29,7 @@ Feature: AWS Kinesis - Sink # Start LocalStack container Given Enable service KINESIS Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify Kinesis events # Create AWS-KINESIS client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.feature b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.feature index 66625ce0..7b7f3c05 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.feature @@ -26,6 +26,7 @@ Feature: AWS Kinesis - Sink # Start LocalStack container Given Enable service KINESIS Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify Kinesis events # Create AWS-KINESIS client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/waitForLocalStack.groovy b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/waitForLocalStack.groovy new file mode 100644 index 00000000..92883aed --- /dev/null +++ b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/waitForLocalStack.groovy @@ -0,0 +1,20 @@ +/* + * 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. + */ + +package aws.ddb + +$(waitFor().seconds(15.0).http().url("${YAKS_TESTCONTAINERS_LOCALSTACK_KINESIS_LOCAL_URL}")) diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/yaks-config.yaml b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/yaks-config.yaml index a35c0447..f7b6da94 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/yaks-config.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/yaks-config.yaml @@ -37,6 +37,7 @@ config: resources: - amazonKinesisClient.groovy - aws-kinesis-source-pipe.yaml + - waitForLocalStack.yaml cucumber: tags: - "not @ignored" diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-http-pipe.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-http-pipe.feature index e0e12afd..3ed4de14 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-http-pipe.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-http-pipe.feature @@ -14,6 +14,7 @@ Feature: AWS S3 Source - Http sink # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-S3 Kamelet to Http # Create Http server diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-broker.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-broker.feature index 252e63a0..fa8049d9 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-broker.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-broker.feature @@ -14,6 +14,7 @@ Feature: AWS S3 Source - Knative broker binding # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy # Create Knative broker Given create Knative broker default And Knative broker default is running diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-channel.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-channel.feature index 6bf82631..ef65915b 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-channel.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-channel.feature @@ -11,6 +11,7 @@ Feature: AWS S3 Source - binding to Knative channel # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy # Create Knative broker and channel Given create Knative broker default And Knative broker default is running diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-cloudevents.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-cloudevents.feature index d8797b1c..93f8f025 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-cloudevents.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-knative-cloudevents.feature @@ -14,6 +14,7 @@ Feature: AWS S3 Source - cloud events data type # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy # Create Knative broker Given create Knative broker default And Knative broker default is running diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-property-conf.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-property-conf.feature index 38ba178d..928d85d2 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-property-conf.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-property-conf.feature @@ -10,6 +10,7 @@ Feature: AWS S3 Source - property based config # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-S3 Kamelet to log binding # Create AWS-S3 client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-secret-conf.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-secret-conf.feature index 9c1f2c81..334b2402 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-secret-conf.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-secret-conf.feature @@ -11,6 +11,7 @@ Feature: AWS S3 Source - secret based config # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy # Create Kubernetes secret Given create Kubernetes secret aws-s3-source-credentials | aws-s3-credentials.properties | citrus:encodeBase64(citrus:readFile(aws-s3-credentials.properties)) | diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-uri-conf.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-uri-conf.feature index ff202d9b..fa7bf156 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-uri-conf.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-source-uri-conf.feature @@ -10,6 +10,7 @@ Feature: AWS S3 Source - URI based config # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-S3 Kamelet to log binding # Create AWS-S3 client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-uri-pipe.feature b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-uri-pipe.feature index 413f2667..78a8a73e 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-uri-pipe.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-uri-pipe.feature @@ -10,6 +10,7 @@ Feature: AWS S3 Source - binding to URI # Start LocalStack container Given Enable service S3 Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-S3 Kamelet to log binding # Create AWS-S3 client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/waitForLocalStack.groovy b/tests/camel-kamelets-itest/src/test/resources/aws/s3/waitForLocalStack.groovy new file mode 100644 index 00000000..870923c2 --- /dev/null +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/waitForLocalStack.groovy @@ -0,0 +1,20 @@ +/* + * 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. + */ + +package aws.ddb + +$(waitFor().seconds(15.0).http().url("${YAKS_TESTCONTAINERS_LOCALSTACK_S3_LOCAL_URL}")) diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/s3/yaks-config.yaml b/tests/camel-kamelets-itest/src/test/resources/aws/s3/yaks-config.yaml index cea110c5..a2d55d91 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/s3/yaks-config.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/aws/s3/yaks-config.yaml @@ -48,6 +48,7 @@ config: - aws-s3-to-knative-channel.yaml - aws-s3-to-knative-broker.yaml - knative-channel-to-log.yaml + - waitForLocalStack.yaml cucumber: tags: - "not @ignored" diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-knative-channel.feature b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-knative-channel.feature index 6aae24e6..ff030a6a 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-knative-channel.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-knative-channel.feature @@ -9,6 +9,7 @@ Feature: AWS SQS Kamelet - binding to InMemoryChannel # Start LocalStack container Given Enable service SQS Given start LocalStack container + Then verify actions waitForLocalStack.groovy # Create Knative broker and channel Given create Knative broker default And Knative broker default is running diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-property-conf.feature b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-property-conf.feature index aa8d493b..1350e096 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-property-conf.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-property-conf.feature @@ -8,6 +8,7 @@ Feature: AWS SQS Kamelet - property based config # Start LocalStack container Given Enable service SQS Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-SQS events # Create AWS-SQS client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-secret-conf.feature b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-secret-conf.feature index 29819b75..0682b836 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-secret-conf.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-secret-conf.feature @@ -9,6 +9,7 @@ Feature: AWS SQS Kamelet - secret based config # Start LocalStack container Given Enable service SQS Given start LocalStack container + Then verify actions waitForLocalStack.groovy # Create Kubernetes secret Given create Kubernetes secret aws-sqs-source-credentials | aws-sqs-credentials.properties | citrus:encodeBase64(citrus:readFile(aws-sqs-credentials.properties)) | diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-uri-conf.feature b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-uri-conf.feature index 9ff7021f..6706b317 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-uri-conf.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-source-uri-conf.feature @@ -8,6 +8,7 @@ Feature: AWS SQS Kamelet - URI based config # Start LocalStack container Given Enable service SQS Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-SQS events # Create AWS-SQS client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-uri-pipe.feature b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-uri-pipe.feature index 5d979a65..26de8b9d 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-uri-pipe.feature +++ b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/aws-sqs-uri-pipe.feature @@ -8,6 +8,7 @@ Feature: AWS SQS Kamelet - binding to URI # Start LocalStack container Given Enable service SQS Given start LocalStack container + Then verify actions waitForLocalStack.groovy Scenario: Verify AWS-SQS events # Create AWS-SQS client diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/waitForLocalStack.groovy b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/waitForLocalStack.groovy new file mode 100644 index 00000000..c3a828a1 --- /dev/null +++ b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/waitForLocalStack.groovy @@ -0,0 +1,20 @@ +/* + * 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. + */ + +package aws.ddb + +$(waitFor().seconds(15.0).http().url("${YAKS_TESTCONTAINERS_LOCALSTACK_SQS_LOCAL_URL}")) diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/yaks-config.yaml b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/yaks-config.yaml index 1cfc62ba..bdf4d8ba 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/sqs/yaks-config.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/aws/sqs/yaks-config.yaml @@ -46,6 +46,7 @@ config: - aws-sqs-uri-pipe.yaml - aws-sqs-to-knative-channel.yaml - knative-channel-to-log.yaml + - waitForLocalStack.yaml cucumber: tags: - "not @ignored" diff --git a/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties b/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties index 33462117..2e6a4d0e 100644 --- a/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties +++ b/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties @@ -8,8 +8,8 @@ citrus.type.converter=camel yaks.cluster.type=local yaks.camelk.max.attempts=10 -yaks.jbang.camel.version=4.6.0 -yaks.jbang.kamelets.version=4.7.0-SNAPSHOT +yaks.jbang.camel.version=4.8.0 +yaks.jbang.kamelets.version=4.8.0 yaks.jbang.kamelets.local.dir=../../../kamelets yaks.jbang.camel.dump.integration.output=true diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink.feature b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink.feature index a72360f6..bb0477cd 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink.feature +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink.feature @@ -18,12 +18,12 @@ Feature: Kafka Kamelet sink Background: - Given variable user is "" - Given variable password is "" Given variables | securityProtocol | PLAINTEXT | | topic | my-topic | | message | Camel K rocks! | + | user | redpanda | + | password | admin | Given Kafka topic: ${topic} Given Kafka topic partition: 0 diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source.feature b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source.feature index d725dcd3..ee297b5a 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source.feature +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source.feature @@ -18,14 +18,14 @@ Feature: Kafka Kamelet source Background: - Given variable user is "" - Given variable password is "" Given variables | securityProtocol | PLAINTEXT | | deserializeHeaders | true | | topic | my-topic | | source | Kafka Kamelet source | | message | Camel K rocks! | + | user | redpanda | + | password | admin | Given Kafka topic: ${topic} Given Kafka topic partition: 0 Given HTTP server timeout is 15000 ms diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/timestamp-router.feature b/tests/camel-kamelets-itest/src/test/resources/kafka/timestamp-router.feature index f54c0c45..76c43a49 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/timestamp-router.feature +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/timestamp-router.feature @@ -18,14 +18,14 @@ Feature: Kafka Timestamp Router Background: - Given variable user is "" - Given variable password is "" Given variables - | securityProtocol | PLAINTEXT | - | topicName | my-topic | - | timestamp | yaks:unixTimestamp()000 | - | topic | ${topicName}_yaks:currentDate('YYYY-MM-dd') | - | message | Camel K rocks! | + | securityProtocol | PLAINTEXT | + | topicName | my-topic | + | timestamp | yaks:unixTimestamp()000 | + | topic | ${topicName}_yaks:currentDate('YYYY-MM-dd') | + | message | Camel K rocks! | + | user | redpanda | + | password | admin | Given Kafka topic: ${topic} Given Kafka topic partition: 0 diff --git a/tests/camel-kamelets-itest/src/test/resources/slack/slack-auth-test.json b/tests/camel-kamelets-itest/src/test/resources/slack/slack-auth-test.json new file mode 100644 index 00000000..b8ce9862 --- /dev/null +++ b/tests/camel-kamelets-itest/src/test/resources/slack/slack-auth-test.json @@ -0,0 +1,8 @@ +{ + "ok": true, + "url": "yaks:resolveURL('slack-service')", + "team": "Camel Workspace", + "user": "camel", + "team_id": "${slack.team.id}", + "user_id": "${slack.user.id}" +} diff --git a/tests/camel-kamelets-itest/src/test/resources/slack/slack-conversations-history.json b/tests/camel-kamelets-itest/src/test/resources/slack/slack-conversations-history.json new file mode 100644 index 00000000..4a660e24 --- /dev/null +++ b/tests/camel-kamelets-itest/src/test/resources/slack/slack-conversations-history.json @@ -0,0 +1,16 @@ +{ + "ok": true, + "messages": [ + { + "type": "message", + "user": "${slack.user.id}", + "text": "${slack.message}", + "ts": "1512085950.000000" + } + ], + "has_more": true, + "pin_count": 0, + "response_metadata": { + "next_cursor": "yaks:randomString(32)" + } +} diff --git a/tests/camel-kamelets-itest/src/test/resources/slack/slack-conversations-list.json b/tests/camel-kamelets-itest/src/test/resources/slack/slack-conversations-list.json new file mode 100644 index 00000000..c0d52585 --- /dev/null +++ b/tests/camel-kamelets-itest/src/test/resources/slack/slack-conversations-list.json @@ -0,0 +1,42 @@ +{ + "ok": true, + "channels": [ + { + "id": "yaks:randomString(9, UPPERCASE)", + "name": "${slack.channel}", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "${slack.user.id}", + "is_archived": false, + "is_general": true, + "unlinked": 0, + "name_normalized": "${slack.channel}", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": false, + "is_mpim": false, + "updated": 1678229664302, + "topic": { + "value": "Company-wide announcements and work-based matters", + "creator": "", + "last_set": 0 + }, + "purpose": { + "value": "This channel is for team-wide communication and announcements. All team members are in this channel.", + "creator": "", + "last_set": 0 + }, + "previous_names": [], + "num_members": 2 + } + ], + "response_metadata": { + "next_cursor": "yaks:randomString(32)" + } +} diff --git a/tests/camel-kamelets-itest/src/test/resources/slack/slack-source.feature b/tests/camel-kamelets-itest/src/test/resources/slack/slack-source.feature index aa8fcb36..36347558 100644 --- a/tests/camel-kamelets-itest/src/test/resources/slack/slack-source.feature +++ b/tests/camel-kamelets-itest/src/test/resources/slack/slack-source.feature @@ -38,89 +38,17 @@ Feature: Slack Kamelet - Source Given expect HTTP request header: Authorization="Bearer ${slack.token}" Given expect HTTP request header: Content-Type="application/x-www-form-urlencoded" When receive POST /api/auth.test - Then HTTP response body - """ - { - "ok": true, - "url": "yaks:resolveURL('slack-service')", - "team": "Camel Workspace", - "user": "yaks", - "team_id": "${slack.team.id}", - "user_id": "${slack.user.id}" - } - """ + Then load HTTP response body slack-auth-test.json Then send HTTP 200 OK # Verify conversations list Given expect HTTP request header: Authorization="Bearer ${slack.token}" When receive POST /api/conversations.list - Then HTTP response body - """ - { - "ok": true, - "channels": [ - { - "id": "yaks:randomString(9, UPPERCASE)", - "name": "${slack.channel}", - "is_channel": true, - "is_group": false, - "is_im": false, - "created": 1449252889, - "creator": "U012A3CDE", - "is_archived": false, - "is_general": true, - "unlinked": 0, - "name_normalized": "${slack.channel}", - "is_shared": false, - "is_ext_shared": false, - "is_org_shared": false, - "pending_shared": [], - "is_pending_ext_shared": false, - "is_member": true, - "is_private": false, - "is_mpim": false, - "updated": 1678229664302, - "topic": { - "value": "Company-wide announcements and work-based matters", - "creator": "", - "last_set": 0 - }, - "purpose": { - "value": "This channel is for team-wide communication and announcements. All team members are in this channel.", - "creator": "", - "last_set": 0 - }, - "previous_names": [], - "num_members": 2 - } - ], - "response_metadata": { - "next_cursor": "yaks:randomString(32)" - } - } - """ + Then load HTTP response body slack-conversations-list.json Then send HTTP 200 OK # Verify conversations history Given expect HTTP request header: Authorization="Bearer ${slack.token}" When receive POST /api/conversations.history - Then HTTP response body - """ - { - "ok": true, - "messages": [ - { - "type": "message", - "user": "${slack.user.id}", - "text": "${slack.message}", - "ts": "1512085950.000216" - } - ], - "has_more": true, - "pin_count": 0, - "response_metadata": { - "next_cursor": "yaks:randomString(32)" - } - } - """ + Then load HTTP response body slack-conversations-history.json Then send HTTP 200 OK # Verify event And Camel K integration slack-source-pipe should print ${slack.message} diff --git a/tests/camel-kamelets-itest/src/test/resources/slack/yaks-config.yaml b/tests/camel-kamelets-itest/src/test/resources/slack/yaks-config.yaml index 4246b46d..faf6d19c 100644 --- a/tests/camel-kamelets-itest/src/test/resources/slack/yaks-config.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/slack/yaks-config.yaml @@ -39,6 +39,9 @@ config: resources: - slack-source-pipe.yaml - slack-sink-pipe.yaml + - slack-auth-test.json + - slack-conversations-list.json + - slack-conversations-history.json cucumber: tags: - "not @ignored"
