diff options
Diffstat (limited to 'test/csit/tests')
4 files changed, 40 insertions, 20 deletions
diff --git a/test/csit/tests/common.robot b/test/csit/tests/common.robot index 8af66a5df..f0dea2552 100644 --- a/test/csit/tests/common.robot +++ b/test/csit/tests/common.robot @@ -1,6 +1,7 @@ #Robot functions that will be shared also with other tests *** Settings *** Library OperatingSystem +Library HttpLibrary.HTTP *** Keywords *** json_from_file diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py index 26d5a91c2..f6a978754 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py @@ -6,7 +6,7 @@ from time import sleep XNF_SIMULATOR_NAME = "xNF Simulator" SIMULATOR_IMAGE_NAME = "onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-xnf-simulator" -SIMULATOR_IMAGE_FULL_NAME = os.getenv("DOCKER_REGISTRY") + "/" + SIMULATOR_IMAGE_NAME + ":latest" +SIMULATOR_IMAGE_FULL_NAME = os.getenv("DOCKER_REGISTRY_PREFIX") + SIMULATOR_IMAGE_NAME + ":latest" WORKSPACE_ENV = os.getenv("WORKSPACE") certificates_dir_path = WORKSPACE_ENV + "/test/csit/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/" collector_certs_lookup_dir = "/etc/ves-hv/" @@ -128,11 +128,11 @@ class XnfSimulator: should_disable_ssl, should_connect_to_unencrypted_hv_ves): self.port = port - cert_name_prefix = "" if should_use_valid_certs else "invalid_" + cert_name_prefix = "" if should_use_valid_certs else "untrusted" certificates_path_with_file_prefix = collector_certs_lookup_dir + cert_name_prefix - self.cert_path = certificates_path_with_file_prefix + "client.crt" - self.key_path = certificates_path_with_file_prefix + "client.key" - self.trust_cert_path = certificates_path_with_file_prefix + "trust.crt" + self.key_store_path = certificates_path_with_file_prefix + "client.p12" + self.trust_store_path = certificates_path_with_file_prefix + "trust.p12" + self.sec_store_passwd = "onaponap" self.disable_ssl = should_disable_ssl self.hv_collector_host = "unencrypted-ves-hv-collector" \ if should_connect_to_unencrypted_hv_ves else "ves-hv-collector" @@ -141,10 +141,12 @@ class XnfSimulator: startup_command = ["--listen-port", self.port, "--ves-host", self.hv_collector_host, "--ves-port", "6061", - "--cert-file", self.cert_path, - "--private-key-file", self.key_path, - "--trust-cert-file", self.trust_cert_path] - if (self.disable_ssl): + "--key-store", self.key_store_path, + "--trust-store", self.trust_store_path, + "--key-store-password", self.sec_store_passwd, + "--trust-store-password", self.sec_store_passwd + ] + if self.disable_ssl: startup_command.append("--ssl-disable") return startup_command diff --git a/test/csit/tests/policy/distribution/distribution-test.robot b/test/csit/tests/policy/distribution/distribution-test.robot new file mode 100644 index 000000000..1b9fa212b --- /dev/null +++ b/test/csit/tests/policy/distribution/distribution-test.robot @@ -0,0 +1,17 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Test Cases *** +Healthcheck + [Documentation] Runs Policy Distribution Health check + ${auth}= Create List healthcheck zb!XztG34 + Log Creating session http://${POLICY_DISTRIBUTION_IP}:6969 + ${session}= Create Session policy http://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request policy /healthcheck headers=${headers} + Log Received response from policy ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.json()['code']} 200 diff --git a/test/csit/tests/vfc/nfvo-wfengine/workflow.robot b/test/csit/tests/vfc/nfvo-wfengine/workflow.robot index 8039ae177..71197304b 100644 --- a/test/csit/tests/vfc/nfvo-wfengine/workflow.robot +++ b/test/csit/tests/vfc/nfvo-wfengine/workflow.robot @@ -80,17 +80,17 @@ UnDeploy BPMN File Testt On MgrService ${resp}= Delete Request web_session /api/workflow/v1/package/${deployedId} Should Be Equal ${resp.status_code} ${200} -# Deploy BPMN File Test On MSB -# [Documentation] Check if the test bpmn file can be deployed in activiti engine -# ${auth}= Create List kermit kermit -# ${headers}= Create Dictionary Accept=application/json -# Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} auth=${auth} -# ${files}= evaluate {"file":open('${bmpfilepath}','rb')} -# ${resp}= Post Request web_session api/workflow/v1/package files=${files} -# Should Be Equal ${resp.status_code} ${200} -# Log ${resp.json()} -# ${deployedId}= Set Variable ${resp.json()["deployedId"]} -# Set Global Variable ${deployedId} +Deploy BPMN File Test On MSB + [Documentation] Check if the test bpmn file can be deployed in activiti engine + ${auth}= Create List kermit kermit + ${headers}= Create Dictionary Accept=application/json + Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} auth=${auth} + ${files}= evaluate {"file":open('${bmpfilepath}','rb')} + ${resp}= Post Request web_session api/workflow/v1/package files=${files} + Should Be Equal ${resp.status_code} ${200} + Log ${resp.json()} + ${deployedId}= Set Variable ${resp.json()["deployedId"]} + Set Global Variable ${deployedId} # Exectue BPMN File Testt On MSB # [Documentation] Check if the test bpmn file can be exectued in MSB |