diff options
Diffstat (limited to 'robot')
-rw-r--r-- | robot/assets/helm/pm-https-server/templates/deployment.yaml | 2 | ||||
-rw-r--r-- | robot/assets/helm/sftp/templates/deployment.yaml | 2 | ||||
-rw-r--r-- | robot/resources/usecases/5gbulkpm_helm_interface.robot | 108 | ||||
-rw-r--r-- | robot/testsuites/usecases/5gbulkpm.robot | 116 |
4 files changed, 117 insertions, 111 deletions
diff --git a/robot/assets/helm/pm-https-server/templates/deployment.yaml b/robot/assets/helm/pm-https-server/templates/deployment.yaml index dc00607a..780ff1a4 100644 --- a/robot/assets/helm/pm-https-server/templates/deployment.yaml +++ b/robot/assets/helm/pm-https-server/templates/deployment.yaml @@ -13,6 +13,8 @@ spec: metadata: labels: {{ include "pmhttpsserver.selectorLabels" . | nindent 8 }} + annotations: + sidecar.istio.io/inject: "false" spec: containers: - name: {{ .Chart.Name }} diff --git a/robot/assets/helm/sftp/templates/deployment.yaml b/robot/assets/helm/sftp/templates/deployment.yaml index 53fc0b12..59f25f34 100644 --- a/robot/assets/helm/sftp/templates/deployment.yaml +++ b/robot/assets/helm/sftp/templates/deployment.yaml @@ -14,6 +14,8 @@ spec: metadata: labels: {{ include "sftp.selectorLabels" . | nindent 8 }} + annotations: + sidecar.istio.io/inject: "false" spec: containers: - name: {{ .Values.fullnameOverride }} diff --git a/robot/resources/usecases/5gbulkpm_helm_interface.robot b/robot/resources/usecases/5gbulkpm_helm_interface.robot index 12e876cd..0419ef43 100644 --- a/robot/resources/usecases/5gbulkpm_helm_interface.robot +++ b/robot/resources/usecases/5gbulkpm_helm_interface.robot @@ -35,9 +35,9 @@ ${PMMAPPER_SUB_ROLE_DATA} ${EXECDIR}/robot/assets/usec ${PMMAPPER_MR_CLUSTER_DATA} ${EXECDIR}/robot/assets/usecases/5gbulkpm/mr_clusters.json ${NEXUS3} ${GLOBAL_INJECTED_NEXUS_DOCKER_REPO} ${SET_KNOWN_HOSTS_FILE_PATH} kubectl set env deployment/$(kubectl get deployment -n onap | grep datafile | awk '{print $1}') KNOWN_HOSTS_FILE_PATH=/home/datafile/.ssh/known_hosts -n onap -${CHECK_ENV_SET} kubectl set env pod/$(kubectl get pod -n onap | grep datafile | awk '{print $1}') --list -n onap -${COPY_RSA_KEY} kubectl cp /tmp/known_hosts $(kubectl get pod -n onap | grep datafile | awk '{print $1}'):/home/datafile/.ssh/known_hosts -n onap -${CHECK_DFC_LOGS} kubectl logs $(kubectl get pod -n onap | grep datafile | awk '{print $1}') -n onap --tail=10 +${CHECK_ENV_SET} kubectl set env pod/$(kubectl get pod -n onap | grep datafile | awk '{print $1}') -c dcae-datafile-collector --list -n onap +${COPY_RSA_KEY} kubectl cp /tmp/known_hosts $(kubectl get pod -n onap | grep datafile | awk '{print $1}'):/home/datafile/.ssh/known_hosts -c dcae-datafile-collector -n onap +${CHECK_DFC_LOGS} kubectl logs $(kubectl get pod -n onap | grep datafile | awk '{print $1}') -c dcae-datafile-collector -n onap --tail=10 ${CHECK_ALL_DFC_LOGS} kubectl logs $(kubectl get pod -n onap | grep datafile | awk '{print $1}') -n onap --all-containers ${CHECK_ALL_PMMAPPER_LOGS} kubectl logs $(kubectl get pod -n onap | grep pm-mapper | awk '{print $1}') -n onap --all-containers ${EXPECTED_PRINT} StrictHostKeyChecking is enabled but environment variable KNOWN_HOSTS_FILE_PATH is not set or points to not existing file @@ -60,7 +60,8 @@ xNF PM File Validate ... This keyword gathers all events from message router topic and validates if in recived data is present an expected string: "${expected_pm_str}" . [Arguments] ${expected_pm_str} ${timestamp}= Get Time epoch - ${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD} + #${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD} + ${resp}= Run MR Get Request ${MR_TOPIC_URL_PATH} Should Contain ${resp.text} ${expected_pm_str} Topic Validate @@ -71,7 +72,8 @@ Topic Validate ${data}= Templating.Apply Template mr ${MR_PUBLISH_TEMPLATE} ${dict} ${resp}= Run MR Auth Post Request (User And Pass) ${MR_TOPIC_URL_PATH_FOR_POST} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD} ${data} Should Be Equal As Strings ${resp.status_code} 200 - ${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD} + #${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD} + ${resp}= Run MR Get Request ${MR_TOPIC_URL_PATH} Should Contain ${resp.text} ${value} Send File Ready Event to VES Collector and Deploy all DCAE Applications @@ -80,16 +82,16 @@ Send File Ready Event to VES Collector and Deploy all DCAE Applications Setting Global Variables Send File Ready Event to VES Collector ${pm_file} ${file_format_type} ${file_format_version} Add chart repository chart-museum http://chart-museum:80 onapinitializer demo123456! - Log To Console Deploying Data File Collector - Deploying Data File Collector - Log To Console Deploying 3GPP PM Mapper - Deploying 3GPP PM Mapper +# Log To Console Deploying Data File Collector +# Deploying Data File Collector +# Log To Console Deploying 3GPP PM Mapper +# Deploying 3GPP PM Mapper Log To Console Deploying SFTP Server As xNF Deploying SFTP Server As xNF - Log To Console Deploying HTTPS Server with correct CMPv2 certificates as xNF - Deploying HTTPS server with correct certificates - Log To Console Deploying HTTPS Server with wrong subject alternatives in CMPv2 certificates as xNF - Deploying HTTPS server with wrong certificates - wrong SAN-s +# Log To Console Deploying HTTPS Server with correct CMPv2 certificates as xNF +# Deploying HTTPS server with correct certificates +# Log To Console Deploying HTTPS Server with wrong subject alternatives in CMPv2 certificates as xNF +# Deploying HTTPS server with wrong certificates - wrong SAN-s DR Bulk PM Feed Check DR PM Mapper Subscriber Check @@ -97,11 +99,11 @@ Usecase Teardown Disable Warnings Get all logs from PM Mapper Get all logs from Data File Collector - Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-datafile-collector - Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-pm-mapper +# Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-datafile-collector +# Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-pm-mapper Uninstall helm charts ${ONAP_HELM_RELEASE}-sftp - Uninstall helm charts ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans - Uninstall helm charts ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans +# Uninstall helm charts ${ONAP_HELM_RELEASE}-pm-https-server-correct-sans +# Uninstall helm charts ${ONAP_HELM_RELEASE}-pm-https-server-wrong-sans Setting Global Variables ${test_variables} = Create Dictionary @@ -261,39 +263,39 @@ Change DFC httpsHostnameVerify configuration in Consul Should Be Equal As Integers ${rc} 0 Wait Until Keyword Succeeds 360 sec 15 sec Check logs kubectl logs -n onap $(kubectl get pods -n onap | grep datafile-collector | awk '{print $1}' | grep -v NAME) ${container_name}-datafile-collector -Sending File Ready Event to VES Collector for HTTPS Server - [Arguments] ${https-server_host} - Send File Ready Event to VES Collector for HTTPS Server ${PM_FILE} ${GLOBAL_TEST_VARIABLES["FILE_FORMAT_TYPE"]} ${GLOBAL_TEST_VARIABLES["FILE_FORMAT_VERSION"]} ${https-server_host} - -Send File Ready Event to VES Collector for HTTPS Server - [Arguments] ${pm_file} ${file_format_type} ${file_format_version} ${https_server_host} - Disable Warnings - ${pm_event} Create Dictionary https_server_host=${https_server_host} pm_file=${pm_file} fileFormatType=${file_format_type} fileFormatVersion=${file_format_version} - Templating.Create Environment pm ${GLOBAL_TEMPLATE_FOLDER} - ${VES_FILE_READY_NOTIFICATION}= Templating.Apply Template pm ${pm_notification_event} ${pm_event} - ${headers}= Create Dictionary content-type=application/json - ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD} - ${session}= Create Session ves ${VES_HEALTH_CHECK_PATH} auth=${auth} - ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 202 - - -Uploading PM Files to xNF HTTPS Server - [Arguments] ${https-server_host} - ${pm_file}= Upload PM Files to xNF HTTPS Server ${GLOBAL_TEST_VARIABLES["PM_FILE_PATH"]} ${https-server_host} - Set Global Variable ${PM_FILE} ${pm_file} - -Upload PM Files to xNF HTTPS Server - [Arguments] ${pm_file_path} ${https_server} - ${epoch}= Get Current Date result_format=epoch - ${pm_file} = Set Variable A${epoch}.xml.gz - Copy File ${pm_file_path} tmp/${pm_file} - ${fileData}= Get Binary File tmp/${pm_file} - ${file_part}= Create List ${pm_file} ${fileData} application/octet-stream - ${fileParts}= Create Dictionary - Set to Dictionary ${fileParts} uploaded_file=${file_part} - ${auth}= Create List demo demo123456! - ${session}= Create Session https http://${https_server}:80 auth=${auth} - ${resp}= Post Request https /upload.php files=${fileParts} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${pm_file} +#Sending File Ready Event to VES Collector for HTTPS Server +# [Arguments] ${https-server_host} +# Send File Ready Event to VES Collector for HTTPS Server ${PM_FILE} ${GLOBAL_TEST_VARIABLES["FILE_FORMAT_TYPE"]} ${GLOBAL_TEST_VARIABLES["FILE_FORMAT_VERSION"]} ${https-server_host} + +#Send File Ready Event to VES Collector for HTTPS Server +# [Arguments] ${pm_file} ${file_format_type} ${file_format_version} ${https_server_host} +# Disable Warnings +# ${pm_event} Create Dictionary https_server_host=${https_server_host} pm_file=${pm_file} fileFormatType=${file_format_type} fileFormatVersion=${file_format_version} +# Templating.Create Environment pm ${GLOBAL_TEMPLATE_FOLDER} +# ${VES_FILE_READY_NOTIFICATION}= Templating.Apply Template pm ${pm_notification_event} ${pm_event} +# ${headers}= Create Dictionary content-type=application/json +# ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD} +# ${session}= Create Session ves ${VES_HEALTH_CHECK_PATH} auth=${auth} +# ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers} +# Should Be Equal As Strings ${resp.status_code} 202 + + +#Uploading PM Files to xNF HTTPS Server +# [Arguments] ${https-server_host} +# ${pm_file}= Upload PM Files to xNF HTTPS Server ${GLOBAL_TEST_VARIABLES["PM_FILE_PATH"]} ${https-server_host} +# Set Global Variable ${PM_FILE} ${pm_file} + +#Upload PM Files to xNF HTTPS Server +# [Arguments] ${pm_file_path} ${https_server} +# ${epoch}= Get Current Date result_format=epoch +# ${pm_file} = Set Variable A${epoch}.xml.gz +# Copy File ${pm_file_path} tmp/${pm_file} +# ${fileData}= Get Binary File tmp/${pm_file} +# ${file_part}= Create List ${pm_file} ${fileData} application/octet-stream +# ${fileParts}= Create Dictionary +# Set to Dictionary ${fileParts} uploaded_file=${file_part} +# ${auth}= Create List demo demo123456! +# ${session}= Create Session https http://${https_server}:80 auth=${auth} +# ${resp}= Post Request https /upload.php files=${fileParts} +# Should Be Equal As Strings ${resp.status_code} 200 +# [Return] ${pm_file} diff --git a/robot/testsuites/usecases/5gbulkpm.robot b/robot/testsuites/usecases/5gbulkpm.robot index a4109d3c..befd3640 100644 --- a/robot/testsuites/usecases/5gbulkpm.robot +++ b/robot/testsuites/usecases/5gbulkpm.robot @@ -31,63 +31,63 @@ SFTP Server based bulk PM test, no SFTP Server know host veryfication on DFC sid 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_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 +#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_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 |