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 10:31:14 UTC
[camel-kamelets] branch main updated (8163f946 -> ab74ae75)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
from 8163f946 Hacktoberfest is over, remove label
new f55d8194 Added Makefile and scripts utility for it-tests
new 9e7d4ac0 Added terraform stuff and camel-jbang dir to .gitignore
new 729c4268 Added AWS IT Tests Camel-Jbang + Terraform based
new 2355e671 Add the ability to specify the Camel version in make of it-tests
new ab74ae75 Added Simple Readme
The 5 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.
Summary of changes:
.gitignore | 3 ++
Makefile => it-tests/Makefile | 30 +++++++++-----
it-tests/README.md | 12 ++++++
.../aws/aws-kinesis/sink/terraform/main.tf | 47 ++++++++++++++++------
.../aws-kinesis/sink/timer-aws-kinesis-it-test.sh | 34 ++++++++++++++++
.../aws/aws-kinesis/sink/timer-aws-kinesis.yaml | 29 +++++++++++++
.../aws-kinesis/source/aws-kinesis-log-it-test.sh | 41 +++++++++++++++++++
.../aws/aws-kinesis/source/aws-kinesis-log.yaml | 29 +++++++++++++
it-tests/aws/aws-kinesis/source/example-file.txt | 1 +
.../aws/aws-kinesis/source/terraform/main.tf | 47 ++++++++++++++++------
.../aws/aws-s3/sink/terraform/main.tf | 43 ++++++++++++++------
it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh | 34 ++++++++++++++++
it-tests/aws/aws-s3/sink/timer-aws-s3.yaml | 29 +++++++++++++
it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh | 41 +++++++++++++++++++
it-tests/aws/aws-s3/source/aws-s3-log.yaml | 29 +++++++++++++
it-tests/aws/aws-s3/source/example-file.txt | 1 +
.../aws/aws-s3/source/terraform/main.tf | 42 +++++++++++++------
.../aws/aws-sqs-fifo/sink/terraform/main.tf | 44 ++++++++++++++------
.../sink/timer-aws-sqs-fifo-it-test.sh | 34 ++++++++++++++++
.../aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo.yaml | 29 +++++++++++++
.../aws/aws-sqs/sink/terraform/main.tf | 42 +++++++++++++------
it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh | 34 ++++++++++++++++
it-tests/aws/aws-sqs/sink/timer-aws-sqs.yaml | 29 +++++++++++++
it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh | 43 ++++++++++++++++++++
it-tests/aws/aws-sqs/source/aws-sqs-log.yaml | 29 +++++++++++++
it-tests/aws/aws-sqs/source/example-file.txt | 1 +
.../aws/aws-sqs/source/terraform/main.tf | 41 +++++++++++++------
.../scripts/results.sh | 6 +--
28 files changed, 726 insertions(+), 98 deletions(-)
copy Makefile => it-tests/Makefile (56%)
create mode 100644 it-tests/README.md
copy library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletTypeEnum.java => it-tests/aws/aws-kinesis/sink/terraform/main.tf (55%)
create mode 100755 it-tests/aws/aws-kinesis/sink/timer-aws-kinesis-it-test.sh
create mode 100644 it-tests/aws/aws-kinesis/sink/timer-aws-kinesis.yaml
create mode 100755 it-tests/aws/aws-kinesis/source/aws-kinesis-log-it-test.sh
create mode 100644 it-tests/aws/aws-kinesis/source/aws-kinesis-log.yaml
create mode 100644 it-tests/aws/aws-kinesis/source/example-file.txt
copy library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletTypeEnum.java => it-tests/aws/aws-kinesis/source/terraform/main.tf (55%)
copy library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletTypeEnum.java => it-tests/aws/aws-s3/sink/terraform/main.tf (59%)
create mode 100755 it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh
create mode 100644 it-tests/aws/aws-s3/sink/timer-aws-s3.yaml
create mode 100755 it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh
create mode 100644 it-tests/aws/aws-s3/source/aws-s3-log.yaml
create mode 100644 it-tests/aws/aws-s3/source/example-file.txt
copy library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletTypeEnum.java => it-tests/aws/aws-s3/source/terraform/main.tf (60%)
copy library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletTypeEnum.java => it-tests/aws/aws-sqs-fifo/sink/terraform/main.tf (58%)
create mode 100755 it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo-it-test.sh
create mode 100644 it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo.yaml
copy library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletTypeEnum.java => it-tests/aws/aws-sqs/sink/terraform/main.tf (60%)
create mode 100755 it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh
create mode 100644 it-tests/aws/aws-sqs/sink/timer-aws-sqs.yaml
create mode 100755 it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh
create mode 100644 it-tests/aws/aws-sqs/source/aws-sqs-log.yaml
create mode 100644 it-tests/aws/aws-sqs/source/example-file.txt
copy library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletTypeEnum.java => it-tests/aws/aws-sqs/source/terraform/main.tf (60%)
copy test/salesforce-sink/delete-secret.sh => it-tests/scripts/results.sh (87%)
mode change 100644 => 100755
[camel-kamelets] 02/05: Added terraform stuff and camel-jbang dir to .gitignore
Posted by ac...@apache.org.
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 9e7d4ac08ea9d81ed6eebc242ea6f28668f80a52
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 10:35:44 2022 +0100
Added terraform stuff and camel-jbang dir to .gitignore
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index 40ff173e..ae7d387f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,5 +28,8 @@ components/camel-cxf/activemq-data
.flattened-pom.xml
.java-version
node_modules/
+terraform.*
+.terraform*
+.camel-jbang*
_output
[camel-kamelets] 05/05: Added Simple Readme
Posted by ac...@apache.org.
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 ab74ae757701f3f22d9122d5add0d0f5b93bdda6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 11:30:01 2022 +0100
Added Simple Readme
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
it-tests/README.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/it-tests/README.md b/it-tests/README.md
new file mode 100644
index 00000000..46cd01de
--- /dev/null
+++ b/it-tests/README.md
@@ -0,0 +1,12 @@
+# Kamelets IT Tests
+
+This folder contains a suite of it-tests for Camel-Kamelets
+
+You'll need:
+- Terraform installed
+- AWS CLI
+- Camel-Jbang
+
+Once everything is set you'll just need to run
+
+make tests camel-version=3.20.0-SNAPSHOT or 3.19.0
[camel-kamelets] 03/05: Added AWS IT Tests Camel-Jbang + Terraform based
Posted by ac...@apache.org.
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 729c4268a07bb5fcec32181c7f6376ceabe52c06
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 10:36:12 2022 +0100
Added AWS IT Tests Camel-Jbang + Terraform based
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
it-tests/aws/aws-kinesis/sink/terraform/main.tf | 56 ++++++++++++++++++++++
.../aws-kinesis/sink/timer-aws-kinesis-it-test.sh | 34 +++++++++++++
.../aws/aws-kinesis/sink/timer-aws-kinesis.yaml | 29 +++++++++++
.../aws-kinesis/source/aws-kinesis-log-it-test.sh | 41 ++++++++++++++++
.../aws/aws-kinesis/source/aws-kinesis-log.yaml | 29 +++++++++++
it-tests/aws/aws-kinesis/source/example-file.txt | 1 +
it-tests/aws/aws-kinesis/source/terraform/main.tf | 56 ++++++++++++++++++++++
it-tests/aws/aws-s3/sink/terraform/main.tf | 52 ++++++++++++++++++++
it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh | 34 +++++++++++++
it-tests/aws/aws-s3/sink/timer-aws-s3.yaml | 29 +++++++++++
it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh | 41 ++++++++++++++++
it-tests/aws/aws-s3/source/aws-s3-log.yaml | 29 +++++++++++
it-tests/aws/aws-s3/source/example-file.txt | 1 +
it-tests/aws/aws-s3/source/terraform/main.tf | 51 ++++++++++++++++++++
it-tests/aws/aws-sqs-fifo/sink/terraform/main.tf | 53 ++++++++++++++++++++
.../sink/timer-aws-sqs-fifo-it-test.sh | 34 +++++++++++++
.../aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo.yaml | 29 +++++++++++
it-tests/aws/aws-sqs/sink/terraform/main.tf | 51 ++++++++++++++++++++
it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh | 34 +++++++++++++
it-tests/aws/aws-sqs/sink/timer-aws-sqs.yaml | 29 +++++++++++
it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh | 43 +++++++++++++++++
it-tests/aws/aws-sqs/source/aws-sqs-log.yaml | 29 +++++++++++
it-tests/aws/aws-sqs/source/example-file.txt | 1 +
it-tests/aws/aws-sqs/source/terraform/main.tf | 50 +++++++++++++++++++
24 files changed, 836 insertions(+)
diff --git a/it-tests/aws/aws-kinesis/sink/terraform/main.tf b/it-tests/aws/aws-kinesis/sink/terraform/main.tf
new file mode 100644
index 00000000..12a8e204
--- /dev/null
+++ b/it-tests/aws/aws-kinesis/sink/terraform/main.tf
@@ -0,0 +1,56 @@
+/*
+ * 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 "kinesis_stream_name" {
+ type = string
+ default = "s3-camel-test-123"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new Kinesis Stream
+resource "aws_kinesis_stream" "MyKinesisStream" {
+ name = var.kinesis_stream_name
+ shard_count = 1
+
+ stream_mode_details {
+ stream_mode = "PROVISIONED"
+ }
+}
+
+output "Kinesis-stream" {
+ value = aws_kinesis_stream.MyKinesisStream.id
+ description = "The Kinesis Stream"
+}
+
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
new file mode 100755
index 00000000..75f871de
--- /dev/null
+++ b/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis-it-test.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: timer-aws-kinesis-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-kinesis.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
+ echo "Test Successful" > ../../../tests/timer-aws-kinesis-it-test.result;
+else
+ 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
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
diff --git a/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis.yaml b/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis.yaml
new file mode 100644
index 00000000..148d0058
--- /dev/null
+++ b/it-tests/aws/aws-kinesis/sink/timer-aws-kinesis.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-kinesis-sink"
+ parameters:
+ stream: "s3-camel-test-123"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
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
new file mode 100755
index 00000000..c815692c
--- /dev/null
+++ b/it-tests/aws/aws-kinesis/source/aws-kinesis-log-it-test.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: aws-kinesis-log-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 aws-kinesis-log.yaml &
+
+sleep 5
+
+aws kinesis put-record --stream-name s3-camel-test-123 --data test --partition-key 1
+aws kinesis put-record --stream-name s3-camel-test-123 --data test --partition-key 1
+aws kinesis put-record --stream-name s3-camel-test-123 --data test --partition-key 1
+aws kinesis put-record --stream-name s3-camel-test-123 --data test --partition-key 1
+aws kinesis put-record --stream-name s3-camel-test-123 --data test --partition-key 1
+
+sleep 5
+
+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`
+if [[ $success == 5 && $fail == 0 ]]
+then
+ echo "Test Successful" > ../../../tests/aws-kinesis-log-it-test.result;
+else
+ echo "Test failed" > ../../../tests/aws-kinesis-log-it-test.result;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop aws-kinesis-log
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
diff --git a/it-tests/aws/aws-kinesis/source/aws-kinesis-log.yaml b/it-tests/aws/aws-kinesis/source/aws-kinesis-log.yaml
new file mode 100644
index 00000000..b32ee65b
--- /dev/null
+++ b/it-tests/aws/aws-kinesis/source/aws-kinesis-log.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: "kamelet:aws-kinesis-source"
+ parameters:
+ stream: "s3-camel-test-123"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
+ steps:
+ - to:
+ uri: "kamelet:log-sink"
+ parameters:
+ showStreams: false
diff --git a/it-tests/aws/aws-kinesis/source/example-file.txt b/it-tests/aws/aws-kinesis/source/example-file.txt
new file mode 100644
index 00000000..9daeafb9
--- /dev/null
+++ b/it-tests/aws/aws-kinesis/source/example-file.txt
@@ -0,0 +1 @@
+test
diff --git a/it-tests/aws/aws-kinesis/source/terraform/main.tf b/it-tests/aws/aws-kinesis/source/terraform/main.tf
new file mode 100644
index 00000000..12a8e204
--- /dev/null
+++ b/it-tests/aws/aws-kinesis/source/terraform/main.tf
@@ -0,0 +1,56 @@
+/*
+ * 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 "kinesis_stream_name" {
+ type = string
+ default = "s3-camel-test-123"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new Kinesis Stream
+resource "aws_kinesis_stream" "MyKinesisStream" {
+ name = var.kinesis_stream_name
+ shard_count = 1
+
+ stream_mode_details {
+ stream_mode = "PROVISIONED"
+ }
+}
+
+output "Kinesis-stream" {
+ value = aws_kinesis_stream.MyKinesisStream.id
+ description = "The Kinesis Stream"
+}
+
diff --git a/it-tests/aws/aws-s3/sink/terraform/main.tf b/it-tests/aws/aws-s3/sink/terraform/main.tf
new file mode 100644
index 00000000..e015dbff
--- /dev/null
+++ b/it-tests/aws/aws-s3/sink/terraform/main.tf
@@ -0,0 +1,52 @@
+/*
+ * 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 "s3_bucket_name" {
+ type = string
+ default = "s3-camel-test-123"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new S3 bucket
+resource "aws_s3_bucket" "MyS3Bucket" {
+ bucket = var.s3_bucket_name
+ force_destroy = true
+}
+
+output "S3-Bucket" {
+ value = aws_s3_bucket.MyS3Bucket.id
+ description = "The S3 Bucket"
+}
+
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
new file mode 100755
index 00000000..9bdb6276
--- /dev/null
+++ b/it-tests/aws/aws-s3/sink/timer-aws-s3-it-test.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: timer-aws-s3-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-s3.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
+ echo "Test Successful" > ../../../tests/timer-aws-s3-it-test.result ;
+else
+ echo "Test failed" > ../../../tests/timer-aws-s3-it-test.result ;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws-s3
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
diff --git a/it-tests/aws/aws-s3/sink/timer-aws-s3.yaml b/it-tests/aws/aws-s3/sink/timer-aws-s3.yaml
new file mode 100644
index 00000000..322f0925
--- /dev/null
+++ b/it-tests/aws/aws-s3/sink/timer-aws-s3.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-s3-sink"
+ parameters:
+ bucketNameOrArn: "s3-camel-test-123"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
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
new file mode 100755
index 00000000..2979f715
--- /dev/null
+++ b/it-tests/aws/aws-s3/source/aws-s3-log-it-test.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: aws-s3-log-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 aws-s3-log.yaml &
+
+sleep 5
+
+aws s3api put-object --bucket s3-camel-test-123 --key example-file-uploaded-1.txt --body example-file.txt --region eu-west-1
+aws s3api put-object --bucket s3-camel-test-123 --key example-file-uploaded-2.txt --body example-file.txt --region eu-west-1
+aws s3api put-object --bucket s3-camel-test-123 --key example-file-uploaded-3.txt --body example-file.txt --region eu-west-1
+aws s3api put-object --bucket s3-camel-test-123 --key example-file-uploaded-4.txt --body example-file.txt --region eu-west-1
+aws s3api put-object --bucket s3-camel-test-123 --key example-file-uploaded-5.txt --body example-file.txt --region eu-west-1
+
+sleep 5
+
+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`
+if [[ $success == 5 && $fail == 0 ]]
+then
+ echo "Test Successful" > ../../../tests/aws-s3-log-it-test.result;
+else
+ echo "Test failed" > ../../../tests/aws-s3-log-it-test.result;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop aws-s3-log
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
diff --git a/it-tests/aws/aws-s3/source/aws-s3-log.yaml b/it-tests/aws/aws-s3/source/aws-s3-log.yaml
new file mode 100644
index 00000000..aad66953
--- /dev/null
+++ b/it-tests/aws/aws-s3/source/aws-s3-log.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: "kamelet:aws-s3-source"
+ parameters:
+ bucketNameOrArn: "s3-camel-test-123"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
+ steps:
+ - to:
+ uri: "kamelet:log-sink"
+ parameters:
+ showStreams: true
diff --git a/it-tests/aws/aws-s3/source/example-file.txt b/it-tests/aws/aws-s3/source/example-file.txt
new file mode 100644
index 00000000..9daeafb9
--- /dev/null
+++ b/it-tests/aws/aws-s3/source/example-file.txt
@@ -0,0 +1 @@
+test
diff --git a/it-tests/aws/aws-s3/source/terraform/main.tf b/it-tests/aws/aws-s3/source/terraform/main.tf
new file mode 100644
index 00000000..bf5d91a8
--- /dev/null
+++ b/it-tests/aws/aws-s3/source/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 "s3_bucket_name" {
+ type = string
+ default = "s3-camel-test-123"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new S3 bucket
+resource "aws_s3_bucket" "MyS3Bucket" {
+ bucket = var.s3_bucket_name
+}
+
+output "S3-Bucket" {
+ value = aws_s3_bucket.MyS3Bucket.id
+ description = "The S3 Bucket"
+}
+
diff --git a/it-tests/aws/aws-sqs-fifo/sink/terraform/main.tf b/it-tests/aws/aws-sqs-fifo/sink/terraform/main.tf
new file mode 100644
index 00000000..d81c7e2a
--- /dev/null
+++ b/it-tests/aws/aws-sqs-fifo/sink/terraform/main.tf
@@ -0,0 +1,53 @@
+/*
+ * 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 "sqs_queue_name" {
+ type = string
+ default = "s3-camel-test-123.fifo"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new SQS Queue
+resource "aws_sqs_queue" "MySQSQueue" {
+ name = var.sqs_queue_name
+ fifo_queue = true
+ content_based_deduplication = true
+}
+
+output "SQS-Queue" {
+ value = aws_sqs_queue.MySQSQueue.id
+ description = "The SQS Queue"
+}
+
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
new file mode 100755
index 00000000..0d5cfb22
--- /dev/null
+++ b/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo-it-test.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: timer-aws-sqs-fifo-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-sqs-fifo.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
+ echo "Test Successful" > ../../../tests/timer-aws-sqs-fifo-it-test.result ;
+else
+ echo "Test failed" > ../../../tests/timer-aws-sqs-fifo-it-test.result ;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws-sqs-fifo
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
diff --git a/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo.yaml b/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo.yaml
new file mode 100644
index 00000000..54c40cb2
--- /dev/null
+++ b/it-tests/aws/aws-sqs-fifo/sink/timer-aws-sqs-fifo.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-sqs-fifo-sink"
+ parameters:
+ queueNameOrArn: "s3-camel-test-123.fifo"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
diff --git a/it-tests/aws/aws-sqs/sink/terraform/main.tf b/it-tests/aws/aws-sqs/sink/terraform/main.tf
new file mode 100644
index 00000000..312d9f73
--- /dev/null
+++ b/it-tests/aws/aws-sqs/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 "sqs_queue_name" {
+ type = string
+ default = "s3-camel-test-123"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new SQS Queue
+resource "aws_sqs_queue" "MySQSQueue" {
+ name = var.sqs_queue_name
+}
+
+output "SQS-Queue" {
+ value = aws_sqs_queue.MySQSQueue.id
+ description = "The SQS Queue"
+}
+
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
new file mode 100755
index 00000000..6dd38283
--- /dev/null
+++ b/it-tests/aws/aws-sqs/sink/timer-aws-sqs-it-test.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: timer-aws-sqs-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-sqs.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
+ echo "Test Successful" > ../../../tests/timer-aws-sqs-it-test.result ;
+else
+ echo "Test failed" > ../../../tests/timer-aws-sqs-it-test.result ;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-aws-sqs
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
diff --git a/it-tests/aws/aws-sqs/sink/timer-aws-sqs.yaml b/it-tests/aws/aws-sqs/sink/timer-aws-sqs.yaml
new file mode 100644
index 00000000..b3d09341
--- /dev/null
+++ b/it-tests/aws/aws-sqs/sink/timer-aws-sqs.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-sqs-sink"
+ parameters:
+ queueNameOrArn: "s3-camel-test-123"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
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
new file mode 100755
index 00000000..ebb18f4b
--- /dev/null
+++ b/it-tests/aws/aws-sqs/source/aws-sqs-log-it-test.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo $0: usage: aws-sqs-log-it-test.sh camel-version
+ exit 1
+fi
+
+camel_version=$1
+
+cd terraform/
+terraform init
+terraform apply -auto-approve
+cd ../
+
+queue_url=`aws sqs get-queue-url --queue-name s3-camel-test-123 --region eu-west-1 | jq -r '.QueueUrl'`
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel run aws-sqs-log.yaml &
+
+sleep 5
+
+aws sqs send-message --queue-url $queue_url --message-body "Test"
+aws sqs send-message --queue-url $queue_url --message-body "Test"
+aws sqs send-message --queue-url $queue_url --message-body "Test"
+aws sqs send-message --queue-url $queue_url --message-body "Test"
+aws sqs send-message --queue-url $queue_url --message-body "Test"
+
+sleep 5
+
+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`
+if [[ $success == 5 && $fail == 0 ]]
+then
+ echo "Test Successful" > ../../../tests/aws-sqs-log-it-test.result;
+else
+ echo "Test failed" > ../../../tests/aws-sqs-log-it-test.result;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop aws-sqs-log
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
diff --git a/it-tests/aws/aws-sqs/source/aws-sqs-log.yaml b/it-tests/aws/aws-sqs/source/aws-sqs-log.yaml
new file mode 100644
index 00000000..fcda5eb8
--- /dev/null
+++ b/it-tests/aws/aws-sqs/source/aws-sqs-log.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: "kamelet:aws-sqs-source"
+ parameters:
+ queueNameOrArn: "s3-camel-test-123"
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
+ steps:
+ - to:
+ uri: "kamelet:log-sink"
+ parameters:
+ showStreams: true
diff --git a/it-tests/aws/aws-sqs/source/example-file.txt b/it-tests/aws/aws-sqs/source/example-file.txt
new file mode 100644
index 00000000..9daeafb9
--- /dev/null
+++ b/it-tests/aws/aws-sqs/source/example-file.txt
@@ -0,0 +1 @@
+test
diff --git a/it-tests/aws/aws-sqs/source/terraform/main.tf b/it-tests/aws/aws-sqs/source/terraform/main.tf
new file mode 100644
index 00000000..4c02458d
--- /dev/null
+++ b/it-tests/aws/aws-sqs/source/terraform/main.tf
@@ -0,0 +1,50 @@
+/*
+ * 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 "sqs_queue_name" {
+ type = string
+ default = "s3-camel-test-123"
+}
+
+
+data "aws_caller_identity" "current" {}
+
+# Create a new SQS Queue
+resource "aws_sqs_queue" "MySQSQueue" {
+ name = var.sqs_queue_name
+}
+
+output "SQS-Queue" {
+ value = aws_sqs_queue.MySQSQueue.id
+ description = "The SQS Queue"
+}
[camel-kamelets] 01/05: Added Makefile and scripts utility for 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 main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit f55d8194cf431c9cca3c1a7f05bfd76e2c6c0891
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 10:33:12 2022 +0100
Added Makefile and scripts utility for it-tests
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
it-tests/Makefile | 33 +++++++++++++++++++++++++++++++++
it-tests/scripts/results.sh | 17 +++++++++++++++++
2 files changed, 50 insertions(+)
diff --git a/it-tests/Makefile b/it-tests/Makefile
new file mode 100644
index 00000000..36bbbc9a
--- /dev/null
+++ b/it-tests/Makefile
@@ -0,0 +1,33 @@
+# 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.
+
+tests:
+ mkdir tests
+ cd aws/aws-s3/source/ && \
+ ./aws-s3-log-it-test.sh 3.20.0-SNAPSHOT
+ cd aws/aws-s3/sink/ && \
+ ./timer-aws-s3-it-test.sh 3.20.0-SNAPSHOT
+ cd aws/aws-kinesis/source/ && \
+ ./aws-kinesis-log-it-test.sh 3.20.0-SNAPSHOT
+ cd aws/aws-kinesis/sink/ && \
+ ./timer-aws-kinesis-it-test.sh 3.20.0-SNAPSHOT
+ cd aws/aws-sqs/source/ && \
+ ./aws-sqs-log-it-test.sh 3.20.0-SNAPSHOT
+ cd aws/aws-sqs/sink/ && \
+ ./timer-aws-sqs-it-test.sh 3.20.0-SNAPSHOT
+ cd aws/aws-sqs-fifo/sink/ && \
+ ./timer-aws-sqs-fifo-it-test.sh 3.20.0-SNAPSHOT
+ ./scripts/results.sh
+ rm -rf tests
diff --git a/it-tests/scripts/results.sh b/it-tests/scripts/results.sh
new file mode 100755
index 00000000..6add40e8
--- /dev/null
+++ b/it-tests/scripts/results.sh
@@ -0,0 +1,17 @@
+# 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.
+
+#!/bin/bash
+for f in tests/*.result ; do FILENAME=`basename ${f%%.*}`; echo ${FILENAME} -- $(cat ${f}); done
[camel-kamelets] 04/05: Add the ability to specify the Camel version in make of 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 main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 2355e671bb102ad173535d5f53346a86c130c501
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 10 11:27:43 2022 +0100
Add the ability to specify the Camel version in make of it-tests
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
it-tests/Makefile | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/it-tests/Makefile b/it-tests/Makefile
index 36bbbc9a..d45d1757 100644
--- a/it-tests/Makefile
+++ b/it-tests/Makefile
@@ -16,18 +16,20 @@
tests:
mkdir tests
cd aws/aws-s3/source/ && \
- ./aws-s3-log-it-test.sh 3.20.0-SNAPSHOT
+ ./aws-s3-log-it-test.sh $(camel-version)
cd aws/aws-s3/sink/ && \
- ./timer-aws-s3-it-test.sh 3.20.0-SNAPSHOT
+ ./timer-aws-s3-it-test.sh $(camel-version)
cd aws/aws-kinesis/source/ && \
- ./aws-kinesis-log-it-test.sh 3.20.0-SNAPSHOT
+ ./aws-kinesis-log-it-test.sh $(camel-version)
cd aws/aws-kinesis/sink/ && \
- ./timer-aws-kinesis-it-test.sh 3.20.0-SNAPSHOT
+ ./timer-aws-kinesis-it-test.sh $(camel-version)
cd aws/aws-sqs/source/ && \
- ./aws-sqs-log-it-test.sh 3.20.0-SNAPSHOT
+ ./aws-sqs-log-it-test.sh $(camel-version)
cd aws/aws-sqs/sink/ && \
- ./timer-aws-sqs-it-test.sh 3.20.0-SNAPSHOT
+ ./timer-aws-sqs-it-test.sh $(camel-version)
cd aws/aws-sqs-fifo/sink/ && \
- ./timer-aws-sqs-fifo-it-test.sh 3.20.0-SNAPSHOT
+ ./timer-aws-sqs-fifo-it-test.sh $(camel-version)
./scripts/results.sh
rm -rf tests
+
+.PHONY: tests clean