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/23 12:04:48 UTC

[camel-kamelets] branch scp-sink-it-test created (now f0f2ae39)

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

acosentino pushed a change to branch scp-sink-it-test
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


      at f0f2ae39 Added SCP Sink IT Test to Makefile

This branch includes the following new commits:

     new 0ad19db3 Added an SCP Sink IT Test
     new f0f2ae39 Added SCP Sink IT Test to Makefile

The 2 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/02: Added an SCP Sink IT Test

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0ad19db30e31404f8fe0b0c5932b2f6bdc7cae82
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 23 13:01:03 2022 +0100

    Added an SCP Sink IT Test
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 it-tests/misc/scp/sink/timer-scp-it-test.sh | 36 +++++++++++++++++++++++++++++
 it-tests/misc/scp/sink/timer-scp.yaml       | 30 ++++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/it-tests/misc/scp/sink/timer-scp-it-test.sh b/it-tests/misc/scp/sink/timer-scp-it-test.sh
new file mode 100755
index 00000000..c1788173
--- /dev/null
+++ b/it-tests/misc/scp/sink/timer-scp-it-test.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+    echo $0: usage: timer-scp-it-test.sh camel-version
+    exit 1
+fi
+
+camel_version=$1
+
+docker pull rastasheep/ubuntu-sshd:14.04
+docker run -d -P --name test_sshd -p 32768:22 rastasheep/ubuntu-sshd:14.04
+
+sleep 5
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel run --local-kamelet-dir=../../../../kamelets/ timer-scp.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`
+if [[ $success == 5 && $fail == 0 ]] 
+then 
+    mkdir -p ../../../tests/
+    echo "Test Successful" > ../../../tests/timer-scp-it-test.result ;
+else
+    mkdir -p ../../../tests/
+    echo "Test failed" > ../../../tests/timer-scp-it-test.result ;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-scp
+
+docker stop test_sshd
+docker rm test_sshd
+
+cat ../../../tests/timer-scp-it-test.result
diff --git a/it-tests/misc/scp/sink/timer-scp.yaml b/it-tests/misc/scp/sink/timer-scp.yaml
new file mode 100644
index 00000000..03bc1fbf
--- /dev/null
+++ b/it-tests/misc/scp/sink/timer-scp.yaml
@@ -0,0 +1,30 @@
+## ---------------------------------------------------------------------------
+## 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:scp-sink"
+          parameters:
+            username: root
+            password: root
+            serverName: localhost
+            serverPort: 32768


[camel-kamelets] 02/02: Added SCP Sink IT Test to Makefile

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f0f2ae39122dfffe4d20966b6b75df1a72a365cb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 23 13:01:58 2022 +0100

    Added SCP Sink IT Test to Makefile
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 it-tests/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/it-tests/Makefile b/it-tests/Makefile
index f45c1245..d123f02a 100644
--- a/it-tests/Makefile
+++ b/it-tests/Makefile
@@ -37,6 +37,8 @@ all:
 	./sftp-log-it-test.sh $(camel-version)
 	cd misc/sftp/sink/ && \
 	./timer-sftp-it-test.sh $(camel-version)
+	cd misc/scp/sink/ && \
+	./timer-scp-it-test.sh $(camel-version)
 	./scripts/results.sh
 	rm -rf tests	
 aws:
@@ -67,6 +69,8 @@ misc:
 	./sftp-log-it-test.sh $(camel-version)
 	cd misc/sftp/sink/ && \
 	./timer-sftp-it-test.sh $(camel-version)
+	cd misc/scp/sink/ && \
+	./timer-scp-it-test.sh $(camel-version)
 	./scripts/results.sh
 	rm -rf tests