aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/datafilecollector-testharness/simulator-group/setup-ftp-files-for-image.sh
diff options
context:
space:
mode:
authorBjornMagnussonXA <bjorn.magnusson@est.tech>2019-03-26 12:48:27 +0000
committerBjornMagnussonXA <bjorn.magnusson@est.tech>2019-03-26 12:48:27 +0000
commit08294064157fc8a13692c5caa132d9cc68b27aba (patch)
tree60cd68baeb488a484d9680d894a1fe15d7888f34 /test/mocks/datafilecollector-testharness/simulator-group/setup-ftp-files-for-image.sh
parentc25ab4f11ff8944142229ba92d514f2ae58ec966 (diff)
Adapted the simulators for running in CSIT
Adaptation to configure, start and stop all simulators Issue-ID: DCAEGEN2-1313 Change-Id: I653a86443b16e769506311086ea46c5d9dab6248 Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Diffstat (limited to 'test/mocks/datafilecollector-testharness/simulator-group/setup-ftp-files-for-image.sh')
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/setup-ftp-files-for-image.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/setup-ftp-files-for-image.sh b/test/mocks/datafilecollector-testharness/simulator-group/setup-ftp-files-for-image.sh
new file mode 100755
index 000000000..d8e57a3d8
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/simulator-group/setup-ftp-files-for-image.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Script to create files for the FTP server to return upon request.
+# The file names matches the files names in the events polled from the MR simulator.
+# Intended for execution in the running ftp containers in the ftp-root dir.
+
+echo "Running ftp file creations"
+
+NUM=200 #Default number of files
+
+if [ $# -eq 1 ]; then
+ NUM=$1
+fi
+
+truncate -s 1MB 1MB.tar.gz
+truncate -s 5MB 5MB.tar.gz
+truncate -s 50MB 50MB.tar.gz
+
+
+i=0
+while [ $i -lt $NUM ]; do #Problem with for loop and var substituion in curly bracket....so used good old style loop
+ ln -s 1MB.tar.gz 1MB_$i.tar.gz
+ ln -s 5MB.tar.gz 5MB_$i.tar.gz
+ let i=i+1
+done
+
+
+ln -s 50MB.tar.gz 50MB_0.tar.gz #Large file, only for single file test