From e81736c80a95e8766f4305f5bb63e56f14dd798e Mon Sep 17 00:00:00 2001
From: TamasBakai <tamas.bakai@est.tech>
Date: Fri, 23 Aug 2019 13:31:57 +0000
Subject: CSIT uplift for CBS, generalized DFC, bugfixes, stability,
 traceability

Issue-ID: DCAEGEN2-1719
Change-Id: If5c96a7f205a34f78e50585a7187c5b9a3820023
Signed-off-by: TamasBakai <tamas.bakai@est.tech>
---
 .../Functional-suite/setup.sh                      |  28 ++++++++++++++++++---
 .../Functional-suite/teardown.sh                   |  17 +++++++------
 .../ManagementInterface-suite/teardown.sh          |   7 ++++--
 .../distribution-test-zip/distributionTestZip.zip  | Bin 148874 -> 148872 bytes
 4 files changed, 38 insertions(+), 14 deletions(-)

(limited to 'plans')

diff --git a/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh
index e2a0c126..2d276e51 100644
--- a/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh
+++ b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh
@@ -3,14 +3,26 @@
 #Stop all running containers
 docker kill "$(docker ps -q -a)"
 docker rm "$(docker ps -q -a)"
+docker system prune -f
 
 # Clone Simulators for DFC from integration repo.
 mkdir -p $WORKSPACE/archives/dfc
 cd $WORKSPACE/archives/dfc
-git clone --depth 1 https://gerrit.onap.org/r/integration -b master
 
-#Location of all individual simulators for DFC
-SIM_ROOT=$WORKSPACE/archives/dfc/integration/test/mocks/datafilecollector-testharness
+
+if [ -z "$SIM_ROOT" ]
+then
+	#git clone --depth 1 https://gerrit.onap.org/r/integration -b master
+	git clone https://github.com/yanhuanwang/integration.git
+	#Location of all individual simulators for DFC
+	echo "Determine SIM_ROOT based on the WORKSPACE"
+	SIM_ROOT=$WORKSPACE/archives/dfc/integration/test/mocks/datafilecollector-testharness
+
+	rm $SIM_ROOT/simulator-group/consul/consul/cbs_localhost_config.hcl || true
+else
+	echo "Using SIM_ROOT from environmental variable: " $SIM_ROOT
+fi
+
 #Location of the above simulators when run as a group. For start+config and stop.
 SIMGROUP_ROOT=$SIM_ROOT/simulator-group
 
@@ -20,7 +32,11 @@ SIM_IP="127.0.0.1"
 DFC_ROOT=$WORKSPACE/scripts/dcaegen2-collectors-datafile/dfc-management
 
 #Make the env vars availble to the robot scripts
-ROBOT_VARIABLES="-v SIMGROUP_ROOT:${SIMGROUP_ROOT} -v SIM_IP:${SIM_IP} -v DFC_ROOT:${DFC_ROOT}"
+ROBOT_VARIABLES="-b debug.log -v SIMGROUP_ROOT:${SIMGROUP_ROOT} -v SIM_IP:${SIM_IP} -v DFC_ROOT:${DFC_ROOT}"
+
+
+
+
 
 #Build needed simulator images. DR and MR simulators
 
@@ -40,5 +56,9 @@ cd $SIMGROUP_ROOT
 cp -r ../ftps-sftp-server/configuration .
 cp -r ../ftps-sftp-server/tls .
 
+cd ../ftps-sftp-server
+docker build -t ftps_vsftpd:latest -f Dockerfile-ftps .
+
+
 #All containers will be started and stopped via the robot tests.
 
diff --git a/plans/dcaegen2-collectors-datafile/Functional-suite/teardown.sh b/plans/dcaegen2-collectors-datafile/Functional-suite/teardown.sh
index 1a0ec6e1..0dc2af18 100644
--- a/plans/dcaegen2-collectors-datafile/Functional-suite/teardown.sh
+++ b/plans/dcaegen2-collectors-datafile/Functional-suite/teardown.sh
@@ -1,13 +1,14 @@
 #!/usr/bin/env bash
 
-#Stop dfc
+running_containers=$(docker ps --filter name=dfc_ -q)
 
-kill-instance.sh dfc_app
 
-#Stop all simulators 
+if [ -z "$running_containers" ]
+then
+    echo "No container requires termination"
+else
+    echo "Stopping and removing containers"
+    docker stop $running_containers
+    docker rm $running_containers
+fi
 
-kill-instance.sh dfc_dr-sim
-kill-instance.sh dfc_dr-redir-sim
-kill-instance.sh dfc_mr-sim
-kill-instance.sh dfc_sftp-server
-kill-instance.sh dfc_ftpes-server-vsftpd
\ No newline at end of file
diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh
index 97ef4037..d8877fbc 100644
--- a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh
+++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh
@@ -1,3 +1,6 @@
 #!/usr/bin/env bash
-
-kill-instance.sh dfc_app
\ No newline at end of file
+set +e
+docker exec -it dfc_app0 cat /var/log/ONAP/application.log > $WORKSPACE/archives/dfc_app0_application.log
+kill-instance.sh dfc_app0
+set -e
+exit 0
diff --git a/plans/so/integration-etsi-testing/config/distribution-test-zip/distributionTestZip.zip b/plans/so/integration-etsi-testing/config/distribution-test-zip/distributionTestZip.zip
index e3152841..ac96bd94 100644
Binary files a/plans/so/integration-etsi-testing/config/distribution-test-zip/distributionTestZip.zip and b/plans/so/integration-etsi-testing/config/distribution-test-zip/distributionTestZip.zip differ
-- 
cgit 1.2.3-korg