diff options
author | Krzysztof Gajewski <krzysztof.gajewski@nokia.com> | 2021-02-17 12:51:58 +0100 |
---|---|---|
committer | Krzysztof Gajewski <krzysztof.gajewski@nokia.com> | 2021-02-17 14:09:42 +0000 |
commit | becc0f905edd450e7cba082240f2c2f3c3d19b87 (patch) | |
tree | 63d7d18ea01322ad1e63cf7ba46d531b280639fc /test | |
parent | 4006186227086db24bacc9ca546bc14ebff698a6 (diff) |
Add HTTPS to DFC tests
- CSIT tests are reported to be unstable.
This fix prevents some 'permission denied' errors and
sftp health checks errors which may occur during non https tests
Issue-ID: DCAEGEN2-2528
Signed-off-by: Krzysztof Gajewski <krzysztof.gajewski@nokia.com>
Change-Id: Ib5d4042ab8207ced3746c390e63c88fc6b49b851
Diffstat (limited to 'test')
3 files changed, 5 insertions, 6 deletions
diff --git a/test/mocks/datafilecollector-testharness/certservice/merger/merge-certs.env b/test/mocks/datafilecollector-testharness/certservice/merger/merge-certs.env index 756787866..fb3fbf57d 100644 --- a/test/mocks/datafilecollector-testharness/certservice/merger/merge-certs.env +++ b/test/mocks/datafilecollector-testharness/certservice/merger/merge-certs.env @@ -1,4 +1,4 @@ -KEYSTORE_SOURCE_PATHS=/opt/app/datafile/etc/cert/external/keystore.p12:/opt/app/datafile/etc/cert/external/keystore.pass -TRUSTSTORES_PASSWORDS_PATHS=/opt/app/datafile/etc/cert/trust.pass:/opt/app/datafile/etc/cert/external/truststore.pass -TRUSTSTORES_PATHS=/opt/app/datafile/etc/cert/trust.jks:/opt/app/datafile/etc/cert/external/truststore.p12 +KEYSTORE_SOURCE_PATHS=/opt/app/datafile/etc/keystore.p12:/opt/app/datafile/etc/keystore.pass +TRUSTSTORES_PASSWORDS_PATHS=/opt/app/datafile/etc/cert/trust.pass:/opt/app/datafile/etc/truststore.pass +TRUSTSTORES_PATHS=/opt/app/datafile/etc/cert/trust.jks:/opt/app/datafile/etc/truststore.p12 KEYSTORE_DESTINATION_PATHS=/opt/app/datafile/etc/cert/cert.p12:/opt/app/datafile/etc/cert/p12.pass diff --git a/test/mocks/datafilecollector-testharness/common/testcase_common.sh b/test/mocks/datafilecollector-testharness/common/testcase_common.sh index 345752b47..a0bc4b4df 100755 --- a/test/mocks/datafilecollector-testharness/common/testcase_common.sh +++ b/test/mocks/datafilecollector-testharness/common/testcase_common.sh @@ -392,12 +392,11 @@ __start_dfc_image() { echo "Starting DFC: " $appname " with ports mapped to " $localport " and " $localport_secure " in docker network "$DOCKER_SIM_NWNAME if [ "$HTTP_TYPE" = "HTTPS" ] then - mkdir "$SIM_GROUP"/tls/external - cp "$SIM_GROUP"/../certservice/generated-certs/dfc-p12/* "$SIM_GROUP"/tls/external/ docker run \ --name oom-certservice-post-processor \ --env-file "$SIM_GROUP"/../certservice/merger/merge-certs.env \ --mount type=bind,src="$SIM_GROUP"/tls,dst=/opt/app/datafile/etc/cert \ + --mount type=bind,src="$SIM_GROUP"/../certservice/generated-certs/dfc-p12,dst=/opt/app/datafile/etc/ \ nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:latest fi docker run -d --volume $(pwd)/../simulator-group/tls/:/opt/app/datafile/etc/cert/ -p $localport":8100" -p $localport_secure":8433" --network=$DOCKER_SIM_NWNAME -e CONSUL_HOST=$CONSUL_HOST -e CONSUL_PORT=$CONSUL_PORT -e CONFIG_BINDING_SERVICE=$CONFIG_BINDING_SERVICE -e CONFIG_BINDING_SERVICE_SERVICE_PORT=$CONFIG_BINDING_SERVICE_SERVICE_PORT -e HOSTNAME=$appname --name $appname $DFC_IMAGE diff --git a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh index f39f052a0..69d47354e 100755 --- a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh +++ b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh @@ -71,7 +71,7 @@ ftpes_server_check() { sftp_server_check() { for i in {1..10}; do - res=$(curl --silent --max-time 3 sftp://localhost:$2 -v -k 2>&1 | grep Connected) + res=$(curl --silent --max-time 3 localhost:$2 2>&1 | grep OpenSSH) if ! [ -z "$res" ]; then echo "Simulator " $1 " on localhost:"$2" responded ok" return |