You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/11/10 12:59:29 UTC
[camel-kamelets] branch aws-sns created (now 91d79c36)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch aws-sns
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
at 91d79c36 Fixed some stuff in AWS SNS Test
This branch includes the following new commits:
new 85fb7653 Added AWS Sink SNS Test
new 50c3e8b1 Improved testing in IT Tests
new 91d79c36 Fixed some stuff in AWS SNS Test
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[camel-kamelets] 01/03: Added AWS Sink SNS Test
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch aws-sns
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 85fb76535c100d3e1efb54fc29bfd67ec59ae66b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 13:22:45 2022 +0100
Added AWS Sink SNS Test
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
it-tests/aws/aws-sns/sink/terraform/main.tf | 51 ++++++++++++++++++++++
it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh | 38 ++++++++++++++++
it-tests/aws/aws-sns/sink/timer-aws-sns.yaml | 29 ++++++++++++
3 files changed, 118 insertions(+)
diff --git a/it-tests/aws/aws-sns/sink/terraform/main.tf b/it-tests/aws/aws-sns/sink/terraform/main.tf
new file mode 100644
index 00000000..ccfa8365
--- /dev/null
+++ b/it-tests/aws/aws-sns/sink/terraform/main.tf
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+terraform {
+ required_providers {
+ aws = {
+ source = "hashicorp/aws"
+ version = "~> 3.27"
+ }
+ }
+
+ required_version = ">= 0.14.9"
+}
+
+provider "aws" {
+ profile = "default"
+ region = "eu-west-1"
+}
+
+variable "sns_topic_name" {
+ type = string
+ default = "s3-camel-test-123"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new SNS TOPIC
+resource "aws_sns_topic" "MySNSTopic" {
+ name = var.sns_topic_name
+}
+
+output "SNS-topic" {
+ value = aws_sns_topic.MySNSTopic.id
+ description = "The SQS Queue"
+}
+
diff --git a/it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh b/it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh
new file mode 100755
index 00000000..d840f428
--- /dev/null
+++ b/it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: timer-aws-sns-it-test.sh camel-version
+ exit 1
+fi
+
+camel_version=$1
+
+cd terraform/
+terraform init
+terraform apply -auto-approve
+cd ../
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel run timer-aws-sns.yaml &
+
+sleep 10
+
+variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get | tail -n +2`
+success=`echo $variable | cut -d' ' -f11`
+fail=`echo $variable | cut -d' ' -f12`
+echo $success $fail
+if [[ $success == 5 && $fail == 0 ]]
+then
+ mkdir -p ../../../tests/
+ echo "Test Successful" > ../../../tests/timer-aws-sns-it-test.result ;
+else
+ mkdir -p ../../../tests/
+ echo "Test failed" > ../../../tests/timer-aws-sns-it-test.result ;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws-sns
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
+
+cat ../../../tests/timer-aws-sns-it-test.result
diff --git a/it-tests/aws/aws-sns/sink/timer-aws-sns.yaml b/it-tests/aws/aws-sns/sink/timer-aws-sns.yaml
new file mode 100644
index 00000000..338e1021
--- /dev/null
+++ b/it-tests/aws/aws-sns/sink/timer-aws-sns.yaml
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+- route:
+ from:
+ uri: "timer://foo?delay=0&fixedRate=true&period=1000&repeatCount=5"
+ steps:
+ - set-body:
+ constant: "test"
+ - to:
+ uri: "kamelet:aws-sns-sink"
+ parameters:
+ topicNameOrArn: "s3-camel-test-123"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
[camel-kamelets] 02/03: Improved testing in IT Tests
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch aws-sns
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 50c3e8b1b29e09d4d93f42af404cfd1d6b9aa615
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 13:30:52 2022 +0100
Improved testing in IT Tests
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
it-tests/Makefile | 4 +++-
it-tests/aws/aws-kinesis/sink/timer-aws-kinesis-it-test.sh | 9 ++++++---
it-tests/aws/aws-kinesis/source/aws-kinesis-log-it-test.sh | 4 ++++
it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh | 5 ++++-
it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh | 4 ++++
it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo-it-test.sh | 5 ++++-
it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh | 5 ++++-
it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh | 4 ++++
8 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/it-tests/Makefile b/it-tests/Makefile
index d45d1757..a15686a0 100644
--- a/it-tests/Makefile
+++ b/it-tests/Makefile
@@ -14,7 +14,7 @@
# limitations under the License.
tests:
- mkdir tests
+ mkdir -p tests
cd aws/aws-s3/source/ && \
./aws-s3-log-it-test.sh $(camel-version)
cd aws/aws-s3/sink/ && \
@@ -29,6 +29,8 @@ tests:
./timer-aws-sqs-it-test.sh $(camel-version)
cd aws/aws-sqs-fifo/sink/ && \
./timer-aws-sqs-fifo-it-test.sh $(camel-version)
+ cd aws/aws-sns/sink/ && \
+ ./timer-aws-sns-it-test.sh $(camel-version)
./scripts/results.sh
rm -rf tests
diff --git a/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis-it-test.sh b/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis-it-test.sh
index 75f871de..3137dd3b 100755
--- a/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis-it-test.sh
+++ b/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis-it-test.sh
@@ -19,12 +19,13 @@ sleep 10
variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get | tail -n +2`
success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
-echo $success $fail
if [[ $success == 5 && $fail == 0 ]]
then
- echo "Test Successful" > ../../../tests/timer-aws-kinesis-it-test.result;
+ mkdir -p ../../../tests/
+ echo "Test Successful" > ../../../tests/timer-aws-kinesis-it-test.result ;
else
- echo "Test failed" > ../../../tests/timer-aws-kinesis-it-test.result;
+ mkdir -p ../../../tests/
+ echo "Test failed" > ../../../tests/timer-aws-kinesis-it-test.result ;
fi
jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws-kinesis
@@ -32,3 +33,5 @@ jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws
cd terraform/
terraform destroy -auto-approve
cd ../
+
+cat ../../../tests/timer-aws-kinesis-it-test.result
diff --git a/it-tests/aws/aws-kinesis/source/aws-kinesis-log-it-test.sh b/it-tests/aws/aws-kinesis/source/aws-kinesis-log-it-test.sh
index c815692c..f8a4a529 100755
--- a/it-tests/aws/aws-kinesis/source/aws-kinesis-log-it-test.sh
+++ b/it-tests/aws/aws-kinesis/source/aws-kinesis-log-it-test.sh
@@ -29,8 +29,10 @@ success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
if [[ $success == 5 && $fail == 0 ]]
then
+ mkdir -p ../../../tests/
echo "Test Successful" > ../../../tests/aws-kinesis-log-it-test.result;
else
+ mkdir -p ../../../tests/
echo "Test failed" > ../../../tests/aws-kinesis-log-it-test.result;
fi
@@ -39,3 +41,5 @@ jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop aws-kines
cd terraform/
terraform destroy -auto-approve
cd ../
+
+cat ../../../tests/aws-kinesis-log-it-test.result
diff --git a/it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh b/it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh
index 9bdb6276..c34a1813 100755
--- a/it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh
+++ b/it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh
@@ -19,11 +19,12 @@ sleep 10
variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get | tail -n +2`
success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
-echo $success $fail
if [[ $success == 5 && $fail == 0 ]]
then
+ mkdir -p ../../../tests/
echo "Test Successful" > ../../../tests/timer-aws-s3-it-test.result ;
else
+ mkdir -p ../../../tests/
echo "Test failed" > ../../../tests/timer-aws-s3-it-test.result ;
fi
@@ -32,3 +33,5 @@ jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws
cd terraform/
terraform destroy -auto-approve
cd ../
+
+cat ../../../tests/timer-aws-s3-it-test.result
diff --git a/it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh b/it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh
index 2979f715..4819d480 100755
--- a/it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh
+++ b/it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh
@@ -29,8 +29,10 @@ success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
if [[ $success == 5 && $fail == 0 ]]
then
+ mkdir -p ../../../tests/
echo "Test Successful" > ../../../tests/aws-s3-log-it-test.result;
else
+ mkdir -p ../../../tests/
echo "Test failed" > ../../../tests/aws-s3-log-it-test.result;
fi
@@ -39,3 +41,5 @@ jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop aws-s3-lo
cd terraform/
terraform destroy -auto-approve
cd ../
+
+cat ../../../tests/aws-s3-log-it-test.result
diff --git a/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo-it-test.sh b/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo-it-test.sh
index 0d5cfb22..5072675f 100755
--- a/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo-it-test.sh
+++ b/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo-it-test.sh
@@ -19,11 +19,12 @@ sleep 10
variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get | tail -n +2`
success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
-echo $success $fail
if [[ $success == 5 && $fail == 0 ]]
then
+ mkdir -p ../../../tests/
echo "Test Successful" > ../../../tests/timer-aws-sqs-fifo-it-test.result ;
else
+ mkdir -p ../../../tests/
echo "Test failed" > ../../../tests/timer-aws-sqs-fifo-it-test.result ;
fi
@@ -32,3 +33,5 @@ jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws
cd terraform/
terraform destroy -auto-approve
cd ../
+
+cat ../../../tests/timer-aws-sqs-fifo-it-test.result
diff --git a/it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh b/it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh
index 6dd38283..042e3ab7 100755
--- a/it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh
+++ b/it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh
@@ -19,11 +19,12 @@ sleep 10
variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get | tail -n +2`
success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
-echo $success $fail
if [[ $success == 5 && $fail == 0 ]]
then
+ mkdir -p ../../../tests/
echo "Test Successful" > ../../../tests/timer-aws-sqs-it-test.result ;
else
+ mkdir -p ../../../tests/
echo "Test failed" > ../../../tests/timer-aws-sqs-it-test.result ;
fi
@@ -32,3 +33,5 @@ jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws
cd terraform/
terraform destroy -auto-approve
cd ../
+
+cat ../../../tests/timer-aws-sqs-it-test.result
diff --git a/it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh b/it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh
index ebb18f4b..3b925640 100755
--- a/it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh
+++ b/it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh
@@ -31,8 +31,10 @@ success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
if [[ $success == 5 && $fail == 0 ]]
then
+ mkdir -p ../../../tests/
echo "Test Successful" > ../../../tests/aws-sqs-log-it-test.result;
else
+ mkdir -p ../../../tests/
echo "Test failed" > ../../../tests/aws-sqs-log-it-test.result;
fi
@@ -41,3 +43,5 @@ jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop aws-sqs-l
cd terraform/
terraform destroy -auto-approve
cd ../
+
+cat ../../../tests/aws-sqs-log-it-test.result
[camel-kamelets] 03/03: Fixed some stuff in AWS SNS Test
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch aws-sns
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 91d79c36d7f98bf49d6420ab5637e32228f8423b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 13:46:01 2022 +0100
Fixed some stuff in AWS SNS Test
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh b/it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh
index d840f428..ce56cc5f 100755
--- a/it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh
+++ b/it-tests/aws/aws-sns/sink/timer-aws-sns-it-test.sh
@@ -19,7 +19,6 @@ sleep 10
variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get | tail -n +2`
success=`echo $variable | cut -d' ' -f11`
fail=`echo $variable | cut -d' ' -f12`
-echo $success $fail
if [[ $success == 5 && $fail == 0 ]]
then
mkdir -p ../../../tests/