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 d48983ebcbdc2447453797d51188a2992d9cb137 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Nov 10 13:30:52 2022 +0100 Improved testing in IT Tests Signed-off-by: Andrea Cosentino <anco...@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