diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2019-03-28 18:14:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-28 18:14:11 +0000 |
commit | 2201af3921058d168581b2a0d9c8ce276efecde6 (patch) | |
tree | 8d342e9010ab8861430564f4b255aa92a83d54de /plans | |
parent | 975f3eb217d02e2a4c92a7a3173c39c8dd92353f (diff) | |
parent | d3104ef51614e203cb87b78ef254fb106ab467bd (diff) |
Merge "Added functional CSIT tests for DFC"
Diffstat (limited to 'plans')
6 files changed, 64 insertions, 25 deletions
diff --git a/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh new file mode 100644 index 00000000..e4940280 --- /dev/null +++ b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +#Stop all running containers +docker kill "$(docker ps -q -a)" +docker rm "$(docker ps -q -a)" + +# 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 #How to make this version controlled for Dublin, El Alto etc etc + +#Location of all individual simulators for DFC +SIM_ROOT=$WORKSPACE/archives/dfc/integration/test/mocks/datafilecollector-testharness +#Location of the above simulators when run as a group. For start+config and stop. +SIMGROUP_ROOT=$SIM_ROOT/simulator-group + +#Default IP for all containers +SIM_IP="127.0.0.1" +#Location of script to start and stop dfc +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}" + +#Build needed simulator images. DR and MR simulators + +cd $SIM_ROOT/mr-sim + +docker build -t mrsim:latest . + +cd $SIM_ROOT/dr-sim + +docker build -t drsim_common:latest . + +#Prepare the ftp simulator files. + +cd $SIMGROUP_ROOT + +#Copy ftp config for the ftp servers +cp -r ../ftps-sftp-server/configuration . +cp -r ../ftps-sftp-server/tls . + +#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 new file mode 100644 index 00000000..1a0ec6e1 --- /dev/null +++ b/plans/dcaegen2-collectors-datafile/Functional-suite/teardown.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +#Stop dfc + +kill-instance.sh dfc_app + +#Stop all simulators + +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/Functional-suite/testplan.txt b/plans/dcaegen2-collectors-datafile/Functional-suite/testplan.txt new file mode 100755 index 00000000..30d7a2d7 --- /dev/null +++ b/plans/dcaegen2-collectors-datafile/Functional-suite/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +dcaegen2-collectors-datafile/testsuites/Functional-Single-File-suite diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/docker-compose.yml b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/docker-compose.yml deleted file mode 100644 index b95842ba..00000000 --- a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/docker-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '2' -services: - dfc: - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest - container_name: dfc - ports: - - "8100:8100" - - "8433:8433" diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh index af24717a..8f50d00b 100644 --- a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh +++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh @@ -1,21 +1,8 @@ #!/usr/bin/env bash -docker-compose up -d - - -DFC=$(docker ps -a -q --filter="name=dfc") - -# Wait for initialization of Docker contaienr for DFC -for i in {1..10}; do -if [ $(docker inspect --format '{{ .State.Running }}' $DFC) ] -then - echo "DFC Container Running" - break -else - echo sleep $i - sleep $i -fi -done +DFC_ROOT=$WORKSPACE/scripts/dcaegen2-collectors-datafile/dfc-management +cd $DFC_ROOT +source dfc-start.sh #Wait for initialization of the DFC service for i in {1..10}; do diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh index bb0ac923..97ef4037 100644 --- a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh +++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -kill-instance.sh dfc
\ No newline at end of file +kill-instance.sh dfc_app
\ No newline at end of file |