aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>2022-03-02 12:23:04 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2022-03-15 09:55:25 +0000
commit93b32fa69f35af6a8751ce8ac9d2d8ec7740e283 (patch)
treebec7efe1889cbd47dc61291f375b2e4f5f16ada8 /robot/resources
parent644abb6035ca5200311f91c5f8a95c0c44c651d0 (diff)
[ROBOT] ADD CMPv2 test cases that use helm based components
Add CMPv2 helm based test cases Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> Issue-ID: INT-1895 Change-Id: Ifbbf80452cd4b65e4b5df5586bfc72c1ecaac731
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/chart_museum.robot22
-rw-r--r--robot/resources/test_templates/cmpv2.robot46
-rw-r--r--robot/resources/usecases/5gbulkpm_helm_interface.robot8
3 files changed, 44 insertions, 32 deletions
diff --git a/robot/resources/chart_museum.robot b/robot/resources/chart_museum.robot
index 7b46deb3..173e2347 100644
--- a/robot/resources/chart_museum.robot
+++ b/robot/resources/chart_museum.robot
@@ -40,38 +40,24 @@ Package and add charts to repository
Install helm charts
[Documentation] Install DCAE Servcie using helm charts
- [Arguments] ${chart_repo_name} ${dcae_servcie_helm_charts} ${dcae_service_helm_name} ${wait_time}=2 min ${set_values_override}=${EMPTY}
- ${helm_install}= Set Variable helm install ${dcae_service_helm_name} ${chart_repo_name}/${dcae_servcie_helm_charts} --set global.repository=${registry_ovveride} ${set_values_override}
+ [Arguments] ${chart_repo_name} ${dcae_servcie_helm_charts} ${dcae_service_helm_name} ${wait_time}=6m0s ${set_values_override}=${EMPTY}
+ ${helm_install}= Set Variable helm install ${dcae_service_helm_name} ${chart_repo_name}/${dcae_servcie_helm_charts} --set global.repository=${registry_ovveride} ${set_values_override} --wait --timeout ${wait_time}
${helm_install_command_output} = Run And Return Rc And Output ${helm_install}
Log ${helm_install_command_output[1]}
Should Be Equal As Integers ${helm_install_command_output[0]} 0
- Wait Until Keyword Succeeds ${wait_time} 20 sec Checking Status Of Deployed Appliction Using Helm ${dcae_servcie_helm_charts} ${dcae_service_helm_name}
Install helm charts from folder
[Documentation] Install DCAE Servcie using helm charts not in repo
- [Arguments] ${chart_folder} ${dcae_service_helm_name} ${wait_time}=2 min ${set_values_override}=${EMPTY}
+ [Arguments] ${chart_folder} ${dcae_service_helm_name} ${wait_time}=2m0s ${set_values_override}=${EMPTY}
${helm_dependency_update}= Set Variable helm dependency update ${chart_folder}
${helm_dependency_update_output} = Run And Return Rc And Output ${helm_dependency_update}
Log ${helm_dependency_update_output[1]}
Should Be Equal As Integers ${helm_dependency_update_output[0]} 0
${rest} ${dcae_servcie_helm_charts} = Split String From Right ${chart_folder} / 1
- ${helm_install}= Set Variable helm install ${dcae_service_helm_name} ${chart_folder} --set global.repository=${registry_ovveride} ${set_values_override}
+ ${helm_install}= Set Variable helm install ${dcae_service_helm_name} ${chart_folder} --set global.repository=${registry_ovveride} ${set_values_override} --wait --timeout ${wait_time}
${helm_install_command_output} = Run And Return Rc And Output ${helm_install}
Log ${helm_install_command_output[1]}
Should Be Equal As Integers ${helm_install_command_output[0]} 0
- Wait Until Keyword Succeeds ${wait_time} 20 sec Checking Status Of Deployed Appliction Using Helm ${dcae_servcie_helm_charts} ${dcae_service_helm_name}
-
-Checking Status Of Deployed Appliction Using Helm
- [Arguments] ${dcae_servcie_helm_charts} ${dcae_service_helm_name}
- ${pod_status}= Set Variable kubectl get pods -n onap | grep ${dcae_service_helm_name} | awk '{print $3}'
- ${pod_status_command_output} = Run And Return Rc And Output ${pod_status}
- Should Be Equal As Integers ${pod_status_command_output[0]} 0
- Should Be Equal As Strings ${pod_status_command_output[1]} Running
- ${pod_ready}= Set Variable kubectl get pods -n onap | grep ${dcae_service_helm_name} | awk '{print $2}'
- ${pod_ready_command_output} = Run And Return Rc And Output ${pod_ready}
- Should Be Equal As Integers ${pod_ready_command_output[0]} 0
- ${pre} ${post} = Split String ${pod_ready_command_output[1]} / 1
- Should Be Equal As Strings ${pre} ${post}
Uninstall helm charts
[Documentation] Uninstall DCAE Servcie using helm charts
diff --git a/robot/resources/test_templates/cmpv2.robot b/robot/resources/test_templates/cmpv2.robot
index 43570f25..3c948846 100644
--- a/robot/resources/test_templates/cmpv2.robot
+++ b/robot/resources/test_templates/cmpv2.robot
@@ -7,9 +7,10 @@ Library ONAPLibrary.JSON
Library ONAPLibrary.Utilities
Library ONAPLibrary.Templating WITH NAME Templating
Resource pnf_registration_without_SO_template.robot
-Resource ../dcae/deployment.robot
-Resource ../dcae/inventory.robot
Resource ../global_properties.robot
+Resource ../resources/test_templates/pnf_registration_without_SO_template.robot
+Resource ../chart_museum.robot
+
*** Variables ***
@@ -18,9 +19,38 @@ ${VES_ENDPOINT} ${GLOBAL_DCAE_VES_HTTPS_PROTOCOL}://${GLOBAL_INJECTED_DCAE_VE
${VES_data_path} eventListener/v7
${single_event_data_path} /simulator/event
${users} ${EXECDIR}/robot/assets/cmpv2/mongo-users.json
-
+${HELM_RELEASE} kubectl --namespace onap get pods | sed 's/ .*//' | grep robot | sed 's/-.*//'
+${CMPv2_helm_values} ${EXECDIR}/robot/assets/cmpv2
+${VES_Client_helm_charts} ${EXECDIR}/robot/assets/helm/ves-client
*** Keywords ***
+
+Suite setup
+ [Arguments] ${PNF_entry_dict}
+ 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
+ Set Global Variable ${ONAP_HELM_RELEASE} ${command_output[1]}
+ Log To Console Deploying VES Client
+ Install VES Client
+ Log To Console Deploying VES collector with CMPv2 and correct sans
+ Install VES collector with CMPv2
+ Log To Console Deploying VES collector with CMPv2 and wrong SANs
+ Install VES collector with CMPv2 and wrong SANs
+
+Install VES Client
+ [Arguments] ${cert}=cmpv2
+ ${override} = Set Variable -f ${CMPv2_helm_values}/ves_client_values_cmpv2.yaml --set fullnameOverride=${ONAP_HELM_RELEASE}-ves-client-cmpv2 --set mongodb.fullnameOverride=${ONAP_HELM_RELEASE}-ves-db-client-cmpv2 --set config.mongoDbName=${ONAP_HELM_RELEASE}-ves-db-client-cmpv2 --set certMethod=${cert} --debug
+ Install helm charts from folder ${VES_Client_helm_charts} ${ONAP_HELM_RELEASE}-ves-client set_values_override=${override}
+
+Install VES collector with CMPv2
+ ${override} = Set Variable -f ${CMPv2_helm_values}/ves_correct_sans_cmpv2.yaml --debug
+ Install helm charts chart-museum dcae-ves-collector ${ONAP_HELM_RELEASE}-dcae-ves-cmpv2-cert-corect-sans 3m ${override}
+
+Install VES collector with CMPv2 and wrong SANs
+ ${override} = Set Variable -f ${CMPv2_helm_values}/ves_wrong_sans_cmpv2.yaml --debug
+ Install helm charts chart-museum dcae-ves-collector ${ONAP_HELM_RELEASE}-dcae-ves-cmpv2-cert-wrong-sans 3m ${override}
+
VES Client send single VES event
[Arguments] ${event} ${ves_host} ${ves_port} ${pnf_sim_host} ${pnf_sim_port} ${http_reposnse_code}=202
${pnf_sim_endpoint}= Set Variable http://${pnf_sim_host}.onap:${pnf_sim_port}
@@ -36,11 +66,7 @@ VES Client send single VES event
Log VES has accepted event with status code ${post_resp.status_code}
[Return] ${post_resp}
-
Usecase Teardown
- Undeploy Service ${mongo-dep}
- Undeploy Service ${ves-client-dep}
- Undeploy Service ves-collector-cmpv2-dep
- Undeploy Service ves-collector-cmpv2-wrong-sans-dep
- Delete Blueprint From Inventory ${serviceTypeIdMongo}
- Delete Blueprint From Inventory ${serviceTypeIdPnfSimulator} \ No newline at end of file
+ Uninstall helm charts ${ONAP_HELM_RELEASE}-ves-client
+ Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-ves-cmpv2-cert-corect-sans
+ Uninstall helm charts ${ONAP_HELM_RELEASE}-dcae-ves-cmpv2-cert-wrong-sans
diff --git a/robot/resources/usecases/5gbulkpm_helm_interface.robot b/robot/resources/usecases/5gbulkpm_helm_interface.robot
index 695cf5cd..218f89b2 100644
--- a/robot/resources/usecases/5gbulkpm_helm_interface.robot
+++ b/robot/resources/usecases/5gbulkpm_helm_interface.robot
@@ -176,10 +176,10 @@ Check Known Hosts In Env
[Return] ${output}
Deploying Data File Collector
- Install helm charts chart-museum dcae-datafile-collector ${ONAP_HELM_RELEASE}-dcae-datafile-collector 3 min --set useCmpv2Certificates=true --set global.cmpv2Enabled=true --set masterPasswordOverride=test --set global.centralizedLoggingEnabled=false --debug
+ Install helm charts chart-museum dcae-datafile-collector ${ONAP_HELM_RELEASE}-dcae-datafile-collector 6m --set useCmpv2Certificates=true --set global.cmpv2Enabled=true --set masterPasswordOverride=test --debug
Deploying 3GPP PM Mapper
- Install helm charts chart-museum dcae-pm-mapper ${ONAP_HELM_RELEASE}-dcae-pm-mapper 3 min --set global.centralizedLoggingEnabled=false --set applicationConfig.enable_tls=true --set applicationConfig.enable_http=false --set applicationConfig.aaf_identity=dcae@dcae.onap.org --set applicationConfig.aaf_password=demo123456! --set applicationConfig.key_store_path=/opt/app/pm-mapper/etc/cert/cert.jks --set applicationConfig.key_store_pass_path=/opt/app/pm-mapper/etc/cert/jks.pass --set applicationConfig.trust_store_path=/opt/app/pm-mapper/etc/cert/trust.jks --set applicationConfig.trust_store_pass_path=/opt/app/pm-mapper/etc/cert/trust.pass --debug
+ Install helm charts chart-museum dcae-pm-mapper ${ONAP_HELM_RELEASE}-dcae-pm-mapper 6m --debug
Deploying SFTP Server As xNF
${override} = Set Variable --set fullnameOverride=${ONAP_HELM_RELEASE}-sftp --debug
@@ -219,7 +219,7 @@ DR PM Mapper Subscriber Check
Setting KNOWN_HOSTS_FILE_PATH Environment Variable in DFC
${rc}= Run and Return RC ${SET_KNOWN_HOSTS_FILE_PATH}
Should Be Equal As Integers ${rc} 0
- Wait Until Keyword Succeeds 5 min 10s Check Known Hosts In Env ${CHECK_ENV_SET}
+ Wait Until Keyword Succeeds 7 min 10s Check Known Hosts In Env ${CHECK_ENV_SET}
${GET_RSA_KEY}= Set Variable kubectl exec $(kubectl get pod -n onap | grep ${ONAP_HELM_RELEASE}-sftp | awk '{print $1}') -n onap -- ssh-keyscan -t rsa ${ONAP_HELM_RELEASE}-sftp > /tmp/known_hosts
${rc}= Run and Return RC ${GET_RSA_KEY}
Should Be Equal As Integers ${rc} 0
@@ -276,7 +276,7 @@ Change DFC httpsHostnameVerify configuration in Consul
Should Be Equal As Strings ${resp.status_code} 200
${rc} = Run and Return RC kubectl delete pods -n onap $(kubectl get pods -n onap | grep datafile-collector | awk '{print $1}' | grep -v NAME)
Should Be Equal As Integers ${rc} 0
- Wait Until Keyword Succeeds 120 sec 5 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
+ 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}