From: Morgan Richomme Date: Mon, 8 Mar 2021 08:48:23 +0000 (+0000) Subject: Merge "Update tests to use new netconf sim" X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=0cbd3333945b636aab635a219c34d7f1420047fe;hp=5e3551bc3760765b71c04f1bc620ef4c91de7462;p=integration%2Fcsit.git Merge "Update tests to use new netconf sim" --- diff --git a/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh b/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh index e712ee1c..6f4e547e 100644 --- a/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh +++ b/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh @@ -151,6 +151,29 @@ if [ "$TIME" -ge "$TIME_OUT" ]; then exit 1; fi +# Check if certificate installation is done +TIME_OUT=300 +INTERVAL=10 +TIME=0 +while [ "$TIME" -lt "$TIME_OUT" ]; do + + docker-compose -f "${SCRIPTS}"/sdnc/sdnc/docker-compose.yml logs sdnc | grep 'Everything OK in Certificate Installation' + + if [ $? == 0 ] ; then + echo SDNC karaf started in $TIME seconds + break; + fi + + echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds + sleep $INTERVAL + TIME=$(($TIME+$INTERVAL)) +done + +if [ "$TIME" -ge "$TIME_OUT" ]; then + echo TIME OUT: karaf session not started in $TIME_OUT seconds, setup failed + exit 1; +fi + # Update default Networking bridge IP in mount.json file sed -i "s/pnfaddr/${LOCAL_IP}/g" "${REQUEST_DATA_PATH}"/mount.xml diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot b/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot index 52cc5d2f..3ea61649 100644 --- a/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot +++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot @@ -55,8 +55,6 @@ Send Get Request And Validate TLS Connection Response &{headers1}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json ${resp1}= Get Request sdnc_restconf ${PNFSIM_MOUNT_PATH} headers=${headers1} Should Be Equal As Strings ${resp1.status_code} ${resp_code} - Should Contain ${resp1.content} netconf-id - Should Contain ${resp1.content} netconf-param Send Delete Request And Validate PNF Mount Deleted [Documentation] Send request to passed url and validate received response diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-properties.robot b/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-properties.robot index e6e9790c..2f2d6f5a 100644 --- a/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-properties.robot +++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-properties.robot @@ -28,7 +28,7 @@ ${SDNC_NETWORK_TOPOLOGY} /config/network-topology:network-topolo ${MOUNT_PATH} %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data ${SDNC_CSR_FILE} %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env ${SDNC_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo -${PNFSIM_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/pnf-simulator +${PNFSIM_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/turing-machine:turing-machine # Netconf-Pnp-Simulator ${NETCONF_PNP_SIM_CONTAINER_NAME} %{NETCONF_PNP_SIM_CONTAINER_NAME} diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot b/tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot index 7d322c1b..4d935974 100644 --- a/tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot +++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot @@ -14,15 +14,14 @@ Check SDNC Keystore For Netopeer2 Certificates [Documentation] Checking Keystore after SDNC istallation Send Get Request And Validate Response Sdnc ${SDNC_KEYSTORE_CONFIG_PATH} 200 -# TLS connection to netconf simulator is not currently working. Commenting -# out for now, and will uncomment when we have working solution. -#Check SDNC And PNF TLS Connection Over Netopeer2 Certificates -# [Tags] SDNC-PNF-TLS-CONNECTION-CHECK -# [Documentation] Checking PNF Mount after SDNC Installation -# Send Get Request And Validate TLS Connection Response ${SDNC_MOUNT_PATH} 200 - -#Check PNF Delete And Remove Netopeer2 Certificates From Keystore -# [Tags] SDNC-PNF-MOUNT-DELETE-CLEAR-KEYSTORE -# [Documentation] Checking PNF Mount Delete from SDNC -# Send Delete Request And Validate PNF Mount Deleted ${SDNC_MOUNT_PATH} 200 + +Check SDNC And PNF TLS Connection Over Netopeer2 Certificates + [Tags] SDNC-PNF-TLS-CONNECTION-CHECK + [Documentation] Checking PNF Mount after SDNC Installation + Send Get Request And Validate TLS Connection Response ${SDNC_MOUNT_PATH} 200 + +Check PNF Delete And Remove Netopeer2 Certificates From Keystore + [Tags] SDNC-PNF-MOUNT-DELETE-CLEAR-KEYSTORE + [Documentation] Checking PNF Mount Delete from SDNC + Send Delete Request And Validate PNF Mount Deleted ${SDNC_MOUNT_PATH} 200