From 01ba3ab25a04b1a78bdf41991dbcf873865d8882 Mon Sep 17 00:00:00 2001 From: Krzysztof Kuzmicki Date: Mon, 21 Mar 2022 11:55:49 +0100 Subject: [ROBOT] Fix failing CMPv2 and 5gbulkpm test cases in CI Fix failing CMPv2 and 5gbulkpm test cases in CI Signed-off-by: Krzysztof Kuzmicki Issue-ID: INT-1895 Change-Id: Iae886bcfe2efdd54f9749aa3240e1a6ee932688a --- robot/resources/test_templates/cmpv2.robot | 1 + robot/testsuites/usecases/5gbulkpm.robot | 93 +++++++++++++++++++++++++++ robot/testsuites/usecases/5gbulkpm_helm.robot | 93 --------------------------- 3 files changed, 94 insertions(+), 93 deletions(-) create mode 100644 robot/testsuites/usecases/5gbulkpm.robot delete mode 100644 robot/testsuites/usecases/5gbulkpm_helm.robot diff --git a/robot/resources/test_templates/cmpv2.robot b/robot/resources/test_templates/cmpv2.robot index f728eaa0..6c50a368 100644 --- a/robot/resources/test_templates/cmpv2.robot +++ b/robot/resources/test_templates/cmpv2.robot @@ -27,6 +27,7 @@ ${VES_Client_helm_charts} ${EXECDIR}/robot/assets/helm/ves-client Suite setup [Arguments] ${PNF_entry_dict} + Add chart repository chart-museum http://chart-museum:80 onapinitializer demo123456! Send VES integration request ${PNF_entry_dict} ${command_output} = Run And Return Rc And Output ${HELM_RELEASE} Should Be Equal As Integers ${command_output[0]} 0 diff --git a/robot/testsuites/usecases/5gbulkpm.robot b/robot/testsuites/usecases/5gbulkpm.robot new file mode 100644 index 00000000..6d805e37 --- /dev/null +++ b/robot/testsuites/usecases/5gbulkpm.robot @@ -0,0 +1,93 @@ +*** Settings *** +Documentation 5G Bulk PM Usecase functionality + +Library RequestsLibrary +Library OperatingSystem +Library Collections +Library String +Library DateTime +Library SSHLibrary +Library JSONLibrary +Library Process +Library ONAPLibrary.JSON +Library ONAPLibrary.Utilities +Resource ../../resources/usecases/5gbulkpm_helm_interface.robot +Resource ../../resources/chart_museum.robot +Suite Setup Send File Ready Event to VES Collector and Deploy all DCAE Applications test org.3GPP.32.435#measCollec V10 +Suite Teardown Usecase Teardown + +*** Variables *** +${DFC_ERROR_GREP_COMMAND_SANS} kubectl logs $(kubectl get pods -n onap | grep datafile-collector | awk '{print $1}' | grep -v NAME) --all-containers -n onap --since=15s | grep "Certificate for .* subject alternative names: .*wrong-sans-2" + +*** Test Cases *** + +SFTP Server based bulk PM test, no SFTP Server know host veryfication on DFC side + [Tags] 5gbulkpm 5gbulkpm_sftp + [Documentation] + ... This test case triggers successful bulk pm upload from SFTP server without SFTP server host verification in DFC known host file. + ... Known host verification is turned off on DFC + Uploading PM Files to xNF SFTP Server + Sending File Ready Event to VES Collector + Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic + Get all logs from Data File Collector + +SFTP Server based bulk PM test, successful SFTP Server known host verification on DFC side + [Tags] 5gbulkpm 5gbulkpm_sftp + [Documentation] + ... This test case triggers successful bulk pm upload from SFTP server with SFTP server host verification in DFC known host file. + ... Known host verification is turned on DFC and to know host is added SFTP server entry + Setting KNOWN_HOSTS_FILE_PATH Environment Variable in DFC + Uploading PM Files to xNF SFTP Server + Sending File Ready Event to VES Collector + Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic + Checking DFC Logs After KNOWN_HOSTS_FILE_PATH Env Variable Added + Get all logs from Data File Collector + +SFTP Server based bulk PM test, not successful SFTP Server know host verification on DFC side + [Tags] 5gbulkpm 5gbulkpm_sftp + [Documentation] + ... This test case triggers unsuccessful bulk pm upload from SFTP server with SFTP server host verification in DFC known host file. + ... Known host verification is turned on DFC and to know host is added wrong SFTP server entry + Changing SFTP Server RSA Key in DFC + Uploading PM Files to xNF SFTP Server + Sending File Ready Event to VES Collector + Checking DFC Logs After KNOWN_HOSTS_FILE_PATH Env Variable Added + Get all logs from Data File Collector + +HTTPS Server based bulk PM test (correct server certificate - correct SANs), successful HTTPS server certificate verification on DFC side + [Tags] 5gbulkpm 5gbulkpm_https + [Documentation] + ... This test case triggers successful bulk pm upload from HTTPS server using CMPv2 Certificate-based authentication + ... Both HTTPS server and DFC have correct certs with correct SAN-s. + ... DFC has turned on hostname verification option, verifies HTTPS server host name and downloads pm file from HTTPS server. + Change DFC httpsHostnameVerify configuration in Consul true + Uploading PM Files to xNF HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans + Sending File Ready Event to VES Collector for HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans + Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic + Get all logs from Data File Collector + +HTTPS Server based bulk PM test (wrong server certificate - wrong SANs), unsuccessful validation on DFC side due to turned on host checking + [Tags] 5gbulkpm 5gbulkpm_https + [Documentation] + ... This test case triggers unsuccessful bulk pm upload from HTTPS server using CMPv2 Certificate-based authentication + ... HTTPS server has incorrect cert with wrong correct SAN-s. DFC has turned on hostname verification option. + ... DFC verifies HTTPS server host name against SAN-s and closes connection. + Change DFC httpsHostnameVerify configuration in Consul true + Uploading PM Files to xNF HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans + Sending File Ready Event to VES Collector for HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans + Wait Until Keyword Succeeds 120 sec 5 sec Check logs ${DFC_ERROR_GREP_COMMAND_SANS} + Get all logs from Data File Collector + +HTTPS Server based bulk PM test (wrong server certificate - wrong SANs), successful validation on DFC side due to turned off host checking + [Tags] 5gbulkpm 5gbulkpm_https + [Documentation] + ... This test case triggers successful bulk pm upload from HTTPS server using CMPv2 Certificate-based authentication + ... HTTPS server has incorrect cert with wrong correct SAN-s. DFC has turned off hostname verification option. + ... DFC does not verify HTTPS server host name against SAN-s and downloads pm file from HTTPS server. + Change DFC httpsHostnameVerify configuration in Consul false + Uploading PM Files to xNF HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans + Sending File Ready Event to VES Collector for HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans + Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic + Get all logs from Data File Collector + + diff --git a/robot/testsuites/usecases/5gbulkpm_helm.robot b/robot/testsuites/usecases/5gbulkpm_helm.robot deleted file mode 100644 index 6d805e37..00000000 --- a/robot/testsuites/usecases/5gbulkpm_helm.robot +++ /dev/null @@ -1,93 +0,0 @@ -*** Settings *** -Documentation 5G Bulk PM Usecase functionality - -Library RequestsLibrary -Library OperatingSystem -Library Collections -Library String -Library DateTime -Library SSHLibrary -Library JSONLibrary -Library Process -Library ONAPLibrary.JSON -Library ONAPLibrary.Utilities -Resource ../../resources/usecases/5gbulkpm_helm_interface.robot -Resource ../../resources/chart_museum.robot -Suite Setup Send File Ready Event to VES Collector and Deploy all DCAE Applications test org.3GPP.32.435#measCollec V10 -Suite Teardown Usecase Teardown - -*** Variables *** -${DFC_ERROR_GREP_COMMAND_SANS} kubectl logs $(kubectl get pods -n onap | grep datafile-collector | awk '{print $1}' | grep -v NAME) --all-containers -n onap --since=15s | grep "Certificate for .* subject alternative names: .*wrong-sans-2" - -*** Test Cases *** - -SFTP Server based bulk PM test, no SFTP Server know host veryfication on DFC side - [Tags] 5gbulkpm 5gbulkpm_sftp - [Documentation] - ... This test case triggers successful bulk pm upload from SFTP server without SFTP server host verification in DFC known host file. - ... Known host verification is turned off on DFC - Uploading PM Files to xNF SFTP Server - Sending File Ready Event to VES Collector - Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic - Get all logs from Data File Collector - -SFTP Server based bulk PM test, successful SFTP Server known host verification on DFC side - [Tags] 5gbulkpm 5gbulkpm_sftp - [Documentation] - ... This test case triggers successful bulk pm upload from SFTP server with SFTP server host verification in DFC known host file. - ... Known host verification is turned on DFC and to know host is added SFTP server entry - Setting KNOWN_HOSTS_FILE_PATH Environment Variable in DFC - Uploading PM Files to xNF SFTP Server - Sending File Ready Event to VES Collector - Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic - Checking DFC Logs After KNOWN_HOSTS_FILE_PATH Env Variable Added - Get all logs from Data File Collector - -SFTP Server based bulk PM test, not successful SFTP Server know host verification on DFC side - [Tags] 5gbulkpm 5gbulkpm_sftp - [Documentation] - ... This test case triggers unsuccessful bulk pm upload from SFTP server with SFTP server host verification in DFC known host file. - ... Known host verification is turned on DFC and to know host is added wrong SFTP server entry - Changing SFTP Server RSA Key in DFC - Uploading PM Files to xNF SFTP Server - Sending File Ready Event to VES Collector - Checking DFC Logs After KNOWN_HOSTS_FILE_PATH Env Variable Added - Get all logs from Data File Collector - -HTTPS Server based bulk PM test (correct server certificate - correct SANs), successful HTTPS server certificate verification on DFC side - [Tags] 5gbulkpm 5gbulkpm_https - [Documentation] - ... This test case triggers successful bulk pm upload from HTTPS server using CMPv2 Certificate-based authentication - ... Both HTTPS server and DFC have correct certs with correct SAN-s. - ... DFC has turned on hostname verification option, verifies HTTPS server host name and downloads pm file from HTTPS server. - Change DFC httpsHostnameVerify configuration in Consul true - Uploading PM Files to xNF HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans - Sending File Ready Event to VES Collector for HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans - Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic - Get all logs from Data File Collector - -HTTPS Server based bulk PM test (wrong server certificate - wrong SANs), unsuccessful validation on DFC side due to turned on host checking - [Tags] 5gbulkpm 5gbulkpm_https - [Documentation] - ... This test case triggers unsuccessful bulk pm upload from HTTPS server using CMPv2 Certificate-based authentication - ... HTTPS server has incorrect cert with wrong correct SAN-s. DFC has turned on hostname verification option. - ... DFC verifies HTTPS server host name against SAN-s and closes connection. - Change DFC httpsHostnameVerify configuration in Consul true - Uploading PM Files to xNF HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans - Sending File Ready Event to VES Collector for HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans - Wait Until Keyword Succeeds 120 sec 5 sec Check logs ${DFC_ERROR_GREP_COMMAND_SANS} - Get all logs from Data File Collector - -HTTPS Server based bulk PM test (wrong server certificate - wrong SANs), successful validation on DFC side due to turned off host checking - [Tags] 5gbulkpm 5gbulkpm_https - [Documentation] - ... This test case triggers successful bulk pm upload from HTTPS server using CMPv2 Certificate-based authentication - ... HTTPS server has incorrect cert with wrong correct SAN-s. DFC has turned off hostname verification option. - ... DFC does not verify HTTPS server host name against SAN-s and downloads pm file from HTTPS server. - Change DFC httpsHostnameVerify configuration in Consul false - Uploading PM Files to xNF HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans - Sending File Ready Event to VES Collector for HTTPS Server ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans - Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic - Get all logs from Data File Collector - - -- cgit 1.2.3-korg