From: Gabriel Cuba Date: Thu, 27 Apr 2023 22:06:54 +0000 (-0500) Subject: Feature 10957: Extend basic_26 to test client side TLS in helm based EE X-Git-Tag: release-v14.0-start~18 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=commitdiff_plain;h=062faaf5ba6a9523abbb074fa765893330699637 Feature 10957: Extend basic_26 to test client side TLS in helm based EE Change-Id: Ic8630dd8f8f7cbad270479ca07082ad73c85f1bd Signed-off-by: Gabriel Cuba --- diff --git a/robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot b/robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot index ae518e7..952de04 100644 --- a/robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot +++ b/robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot @@ -28,10 +28,10 @@ Suite Teardown Run Keyword And Ignore Error Suite Cleanup *** Variables *** # NS and VNF descriptor package folder and ids -${vnfd_pkg} simple_secure_ee_vnf -${vnfd_name} simple_secure_ee-vnf -${nsd_pkg} simple_secure_ee_ns -${nsd_name} simple_secure_ee-ns +${vnfd_pkg} simple_ee_vnf +${vnfd_name} simple_ee-vnf +${nsd_pkg} simple_ee_ns +${nsd_name} simple_ee-ns # NS instance name and configuration ${ns_name} basic_26_secure_helm_ee_test @@ -39,7 +39,7 @@ ${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] } # SSH keys and username to be used ${publickey} %{HOME}/.ssh/id_rsa.pub -${privatekey} %{HOME}/.ssh/id_rsa +${privatekey} %{OSM_RSA_FILE} ${username} ubuntu ${password} ${EMPTY} @@ -49,6 +49,8 @@ ${vnf_member_index} simple ${day_1_file_name} /home/ubuntu/first-touch ${ns_timeout} 15min +${host} %{OSM_HOSTNAME} +${username} ubuntu *** Test Cases *** Create VNF Descriptor @@ -88,6 +90,23 @@ Check Remote File Created Via Day 1 Operation Check If remote File Exists ${vnf_ip_addr} ${username} ${password} ${privatekey} ${day_1_file_name} +Get data from EE pod + + Open Connection ${host} + Login With Public Key ${username} keyfile=${privatekey} + ${pod}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} kubectl get pod -n ${ns_id} --no-headers -o custom-columns=":metadata.name" + ${svc}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} kubectl get svc -n ${ns_id} -l app.kubernetes.io/name=eechart -o jsonpath='{.items[0].spec.clusterIP}' + Set Suite Variable ${pod_name} ${pod} + Set Suite Variable ${svc_ip} ${svc} + + +Fail when trying to access gRPC server without TLS + + ${command} = Catenate python3 osm_ee/frontend_client.py ${svc_ip} 50050 sleep + ${result}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} kubectl exec -it -n ${ns_id} ${pod_name} -- ${command} + Should Contain ${result} Connection lost + + Delete NS Instance [Tags] cleanup