diff options
Diffstat (limited to 'test/csit/tests')
30 files changed, 405 insertions, 152 deletions
diff --git a/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot b/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot index 305044cb0..e8b1429d0 100644 --- a/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot +++ b/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot @@ -60,6 +60,7 @@ Set Properties for HolmesModel1 Select From List By Label id=vf vFirewall 0 Select From List By Label id=actionSet VNF Select From List By Label id=location Data Center 2 Data Center 3 + Input Text locator=deployParameters text={} Click Button locator=Save Set Policy Box properties for HolmesModel1 diff --git a/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot index 0dc0a8abb..bdc537eab 100644 --- a/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot +++ b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot @@ -53,6 +53,7 @@ Set Properties for TCAModel1 Select From List By Label id=vf vLoadBalancer 0 Select From List By Label id=actionSet VNF Select From List By Label id=location Data Center 1 Data Center 3 + Input Text locator=deployParameters text={} Click Button locator=Save Set Policy Box properties for TCAModel1 diff --git a/test/csit/tests/dcae-bulkpm/testcases/__init__.robot b/test/csit/tests/dcae-bulkpm/testcases/__init__.robot new file mode 100644 index 000000000..7114fd447 --- /dev/null +++ b/test/csit/tests/dcae-bulkpm/testcases/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation 5G Bulk PM E2E Testcases diff --git a/test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json b/test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json new file mode 100644 index 000000000..96068e39a --- /dev/null +++ b/test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json @@ -0,0 +1,30 @@ +{ + "event": { + "commonEventHeader": { + "version": "4.0.1", + "vesEventListenerVersion": "7.0.1", + "domain": "notification", + "eventName": "Noti_RnNode-Ericsson_FileReady", + "eventId": "FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1", + "lastEpochMicrosec": 8745745764578, + "priority": "Normal", + "reportingEntityName": "otenb5309", + "sequence": 0, + "sourceName": "oteNB5309", + "startEpochMicrosec": 8745745764578, + "timeZoneOffset": "UTC+05.30" + }, + "notificationFields": { + "changeIdentifier": "PM_MEAS_FILES", + "changeType": "FileReady", + "notificationFieldsVersion": "2.0", + "additionalFields": + { + "location": "ftpes://192.168.0.101:22/ftp/rop/A20161224.1030-1045.bin.gz", + "compression": "gzip", + "fileformatType": "org.3GPP.32.435#measCollec", + "fileFormatVersion": "V10" + } + } + } + }
\ No newline at end of file diff --git a/test/csit/tests/dcae-bulkpm/testcases/e2e.robot b/test/csit/tests/dcae-bulkpm/testcases/e2e.robot new file mode 100644 index 000000000..69c795341 --- /dev/null +++ b/test/csit/tests/dcae-bulkpm/testcases/e2e.robot @@ -0,0 +1,40 @@ +*** Settings *** +Documentation Testing E2E VES,Dmaap,DFC,DR with File Ready event feed from xNF +Library RequestsLibrary +Library OperatingSystem +Library Collections +Resource resources/ves_keywords.robot + + +*** Variables *** +${VESC_URL} http://%{VESC_IP}:8080 +${GLOBAL_APPLICATION_ID} robot-ves +${VES_ANY_EVENT_PATH} /eventListener/v7 +${HEADER_STRING} content-type=application/json +${EVENT_DATA_FILE} %{WORKSPACE}/test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json + +${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics +${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000 +*** Test Cases *** + +Send VES File Ready Event to VES Collector + [Tags] DCAE-VESC-R1 + [Documentation] Post single event and expect 200 Response + ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} + ${headers}= Create Header From String ${HEADER_STRING} + ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} + Log Receive HTTP Status code ${resp.status_code} + Should Be Equal As Strings ${resp.status_code} 202 + +Check VES Notification Topic is existing in Message Router + [Documentation] Get the count of the Topics + [Timeout] 1 minute + Sleep 10s + ${resp}= GetCall ${TARGETURL_TOPICS} + log ${TARGETURL_TOPICS} + log 'JSON Response Code :'${resp} + ${topics}= Evaluate $resp.json().get('topics') + log ${topics} + ${ListLength}= Get Length ${topics} + log ${ListLength} + List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT diff --git a/test/csit/tests/dcae-bulkpm/testcases/resources/VesLibrary.py b/test/csit/tests/dcae-bulkpm/testcases/resources/VesLibrary.py new file mode 100644 index 000000000..d1ec9811d --- /dev/null +++ b/test/csit/tests/dcae-bulkpm/testcases/resources/VesLibrary.py @@ -0,0 +1,25 @@ +''' +Created on Aug 18, 2017 + +@author: sw6830 +''' +from robot.api import logger +from Queue import Queue +import uuid, time, json, threading,os, platform, subprocess,paramiko + +class VesLibrary(object): + + def __init__(self): + pass + + def create_header_from_string(self, dictStr): + logger.info("Enter create_header_from_string: dictStr") + return dict(u.split("=") for u in dictStr.split(",")) + + def Generate_UUID(self): + """generate a uuid""" + return uuid.uuid4() + +if __name__ == '__main__': + lib = VesLibrary() + time.sleep(100000)
\ No newline at end of file diff --git a/test/csit/tests/dcae-bulkpm/testcases/resources/ves_keywords.robot b/test/csit/tests/dcae-bulkpm/testcases/resources/ves_keywords.robot new file mode 100644 index 000000000..76bc33f47 --- /dev/null +++ b/test/csit/tests/dcae-bulkpm/testcases/resources/ves_keywords.robot @@ -0,0 +1,39 @@ + *** Settings *** +Documentation The main interface for interacting with VES. It handles low level stuff like managing the http request library and VES required fields +Library RequestsLibrary +Library ../resources/VesLibrary.py +Library OperatingSystem +Library Collections +Library requests +Library Collections +Library String + +*** Variables *** + +*** Keywords *** + +Get Event Data From File + [Arguments] ${jsonfile} + ${data}= OperatingSystem.Get File ${jsonfile} + #Should Not Be_Equal ${data} None + [return] ${data} + +Publish Event To VES Collector + [Documentation] Send an event to VES Collector + [Arguments] ${url} ${evtpath} ${httpheaders} ${evtdata} + Log Creating session ${url} + ${session}= Create Session dcaegen2-d1 ${url} + ${resp}= Post Request dcaegen2-d1 ${evtpath} data=${evtdata} headers=${httpheaders} + #Log Received response from dcae ${resp.json()} + [return] ${resp} +PostCall + [Arguments] ${url} ${data} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests + [Return] ${resp} + +GetCall + [Arguments] ${url} + ${resp}= Evaluate requests.get('${url}') requests + [Return] ${resp} +
\ No newline at end of file diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot index 1b832f27d..15c1c4896 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot @@ -11,21 +11,47 @@ Test Teardown VES-HV Collector Test Shutdown Client Authorization Suite Setup Log Started Suite: VES-HV Client Authorization ${XNF_PORTS_LIST}= Create List 7000 - Configure Invalid xNF Simulators On Ports ${XNF_PORTS_LIST} + ${XNF_WITH_INVALID_CERTIFICATES}= Configure xNF Simulators ${XNF_PORTS_LIST} + ... should_use_valid_certs=${false} + Set Suite Variable ${XNF_WITH_INVALID_CERTIFICATES} + ${XNF_PORTS_LIST}= Create List 7001 + ${XNF_WITHOUT_SSL}= Configure xNF Simulators ${XNF_PORTS_LIST} + ... should_disable_ssl=${true} + Set Suite Variable ${XNF_WITHOUT_SSL} + ${XNF_PORTS_LIST}= Create List 7002 + ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES}= Configure xNF Simulators ${XNF_PORTS_LIST} + ... should_disable_ssl=${true} + ... should_connect_to_unencrypted_hv_ves=${true} + Set Suite Variable ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES} Log Suite setup finished - *** Test Cases *** Authorization [Documentation] VES-HV Collector should not authorize XNF with invalid certificate and not route any message ... to topics - ${SIMULATORS_LIST}= Get Invalid xNF Simulators 1 - Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_VALID_MESSAGES_REQUEST} + Send Messages From xNF Simulators ${XNF_WITH_INVALID_CERTIFICATES} ${XNF_VALID_MESSAGES_REQUEST} + + Wait until keyword succeeds 60 sec 5 sec + ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0} + +Unencrypted connection from client + [Documentation] VES-HV Collector should not authorize XNF trying to connect through unencrypted connection + + Send Messages From xNF Simulators ${XNF_WITHOUT_SSL} ${XNF_VALID_MESSAGES_REQUEST} Wait until keyword succeeds 60 sec 5 sec ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0} +Unencrypted connection on both ends + [Documentation] When run without SSL turned on, VES-HV Collector should route all valid messages + ... from xNF trying to connect through unencrypted connection + + Send Messages From xNF Simulators ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES} ${XNF_VALID_MESSAGES_REQUEST} + + Wait until keyword succeeds 60 sec 5 sec + ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_5000} + *** Variables *** ${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios @@ -33,3 +59,4 @@ ${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcae ${XNF_VALID_MESSAGES_REQUEST} ${VES_HV_SCENARIOS}/authorization/xnf-valid-messages-request.json ${AMOUNT_0} 0 +${AMOUNT_5000} 5000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py index 0d1d928b5..c0dcd81d4 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py @@ -1,12 +1,19 @@ import requests from robot.api import logger +valid_status_codes = [ + requests.codes.ok, + requests.codes.accepted +] + + def session_without_env(): session = requests.Session() session.trust_env = False return session + def checkStatusCode(status_code, server_name): - if status_code != 200: + if status_code not in valid_status_codes: logger.error("Response status code from " + server_name + ": " + str(status_code)) - raise (Exception(server_name + " returned status code " + status_code))
\ No newline at end of file + raise (Exception(server_name + " returned status code " + status_code)) 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 b2466d7ca..26d5a91c2 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 @@ -1,4 +1,3 @@ -from VesHvContainersUtilsLibrary import copy_to_container import HttpRequests import os import docker @@ -16,13 +15,22 @@ ONE_SECOND_IN_NANOS = 10 ** 9 class XnfSimulatorLibrary: - def start_xnf_simulators(self, list_of_ports, valid_certs=True): + def start_xnf_simulators(self, list_of_ports, + should_use_valid_certs=True, + should_disable_ssl=False, + should_connect_to_unencrypted_hv_ves=False): logger.info("Creating " + str(len(list_of_ports)) + " xNF Simulator containers") dockerClient = docker.from_env() - cert_name_prefix = "" if valid_certs else "invalid_" + self.pullImageIfAbsent(dockerClient) logger.info("Using image: " + SIMULATOR_IMAGE_FULL_NAME) - simulators_addresses = self.create_simulators(dockerClient, list_of_ports, cert_name_prefix) + + simulators_addresses = self.create_containers(dockerClient, + list_of_ports, + should_use_valid_certs, + should_disable_ssl, + should_connect_to_unencrypted_hv_ves) + self.assert_containers_startup_was_successful(dockerClient) dockerClient.close() return simulators_addresses @@ -35,34 +43,24 @@ class XnfSimulatorLibrary: "This can take a while.") dockerClient.images.pull(SIMULATOR_IMAGE_FULL_NAME) - def create_simulators(self, dockerClient, list_of_ports, cert_name_prefix): + def create_containers(self, + dockerClient, + list_of_ports, + should_use_valid_certs, + should_disable_ssl, + should_connect_to_unencrypted_hv_ves): simulators_addresses = [] for port in list_of_ports: - container = self.run_simulator(dockerClient, port, - collector_certs_lookup_dir + cert_name_prefix + "client.crt", - collector_certs_lookup_dir + cert_name_prefix + "client.key", - collector_certs_lookup_dir + cert_name_prefix + "trust.crt" - ) - + xnf = XnfSimulator(port, should_use_valid_certs, should_disable_ssl, should_connect_to_unencrypted_hv_ves) + container = self.run_simulator(dockerClient, xnf) logger.info("Started container: " + container.name + " " + container.id) - simulators_addresses.append(container.name + ":" + port) + simulators_addresses.append(container.name + ":" + xnf.port) return simulators_addresses - def run_simulator(self, dockerClient, port, client_crt_path, client_key_path, client_trust_store): - xNF_startup_command = ["--listen-port", port, - "--ves-host", "ves-hv-collector", - "--ves-port", "6061", - "--cert-file", client_crt_path, - "--private-key-file", client_key_path, - "--trust-cert-file", client_trust_store] - xNF_healthcheck_command = { - "interval": 5 * ONE_SECOND_IN_NANOS, - "timeout": 3 * ONE_SECOND_IN_NANOS, - "retries": 1, - "test": ["CMD", "curl", "--request", "GET", - "--fail", "--silent", "--show-error", - "localhost:" + port + "/healthcheck"] - } + def run_simulator(self, dockerClient, xnf): + xNF_startup_command = xnf.get_startup_command() + xNF_healthcheck_command = xnf.get_healthcheck_command() + port = xnf.port logger.info("Startup command: " + str(xNF_startup_command)) logger.info("Healthcheck command: " + str(xNF_healthcheck_command)) return dockerClient.containers.run(SIMULATOR_IMAGE_FULL_NAME, @@ -72,7 +70,7 @@ class XnfSimulatorLibrary: network="ves-hv-default", ports={port + "/tcp": port}, volumes=self.container_volumes(), - name="ves-hv-collector-xnf-simulator" + port) + name=xnf.container_name_prefix + port) def container_volumes(self): return {certificates_dir_path: {"bind": collector_certs_lookup_dir, "mode": 'rw'}} @@ -121,6 +119,46 @@ class XnfSimulatorLibrary: HttpRequests.checkStatusCode(resp.status_code, XNF_SIMULATOR_NAME) +class XnfSimulator: + container_name_prefix = "ves-hv-collector-xnf-simulator" + + def __init__(self, + port, + should_use_valid_certs, + should_disable_ssl, + should_connect_to_unencrypted_hv_ves): + self.port = port + cert_name_prefix = "" if should_use_valid_certs else "invalid_" + 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.disable_ssl = should_disable_ssl + self.hv_collector_host = "unencrypted-ves-hv-collector" \ + if should_connect_to_unencrypted_hv_ves else "ves-hv-collector" + + def get_startup_command(self): + 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): + startup_command.append("--ssl-disable") + return startup_command + + def get_healthcheck_command(self): + return { + "interval": 5 * ONE_SECOND_IN_NANOS, + "timeout": 3 * ONE_SECOND_IN_NANOS, + "retries": 1, + "test": ["CMD", "curl", "--request", "GET", + "--fail", "--silent", "--show-error", + "localhost:" + self.port + "/healthcheck"] + } + + class ContainerException(Exception): def __init__(self, message): super(ContainerException, self).__init__(message) diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot index 6153afa0a..89208e456 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot @@ -14,7 +14,7 @@ Test Teardown VES-HV Collector Test Shutdown Message Routing Suite Setup Log Started Suite: VES-HV Message Routing ${XNF_PORTS_LIST}= Create List 7000 - Configure Valid xNF Simulators On Ports ${XNF_PORTS_LIST} + Configure xNF Simulators Using Valid Certificates On Ports ${XNF_PORTS_LIST} Log Suite setup finished *** Test Cases *** @@ -22,8 +22,8 @@ Correct Messages Routing [Documentation] VES-HV Collector should route all valid messages to topics specified in configuration ... and do not change message payload generated in XNF simulator - ${SIMULATORS_LIST}= Get Valid xNF Simulators 1 - Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_FIXED_PAYLOAD_REQUEST} + ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_FIXED_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} @@ -33,8 +33,8 @@ Correct Messages Routing Too big payload message handling [Documentation] VES-HV Collector should interrupt the stream when encountered message with too big payload - ${SIMULATORS_LIST}= Get Valid xNF Simulators 1 - Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_TOO_BIG_PAYLOAD_REQUEST} + ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_TOO_BIG_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec ... Assert Dcae App Consumed Less Equal Than ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} @@ -43,8 +43,8 @@ Too big payload message handling Invalid wire frame message handling [Documentation] VES-HV Collector should skip messages with invalid wire frame - ${SIMULATORS_LIST}= Get Valid xNF Simulators 1 - Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_INVALID_WIRE_FRAME_REQUEST} + ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_WIRE_FRAME_REQUEST} Wait until keyword succeeds 60 sec 5 sec ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} @@ -54,8 +54,8 @@ Invalid wire frame message handling Invalid GPB data message handling [Documentation] VES-HV Collector should skip messages with invalid GPB data - ${SIMULATORS_LIST}= Get Valid xNF Simulators 1 - Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_INVALID_GPB_DATA_REQUEST} + ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_GPB_DATA_REQUEST} Wait until keyword succeeds 60 sec 5 sec ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} @@ -65,8 +65,8 @@ Invalid GPB data message handling Unsupported domain message handling [Documentation] VES-HV Collector should skip messages with unsupported domain - ${SIMULATORS_LIST}= Get Valid xNF Simulators 1 - Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_UNSUPPORTED_DOMAIN_REQUEST} + ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_UNSUPPORTED_DOMAIN_REQUEST} Wait until keyword succeeds 60 sec 5 sec ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot index 862a2bc6a..9b1982a6b 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot @@ -11,14 +11,14 @@ Test Teardown VES-HV Collector Test Shutdown Multiple Clients Handling Suite Setup Log Started Suite: VES-HV Multiple Clients Handling ${XNF_PORTS_LIST}= Create List 7000 7001 7002 - Configure Valid xNF Simulators On Ports ${XNF_PORTS_LIST} + Configure xNF Simulators Using Valid Certificates On Ports ${XNF_PORTS_LIST} Log Suite setup finished *** Test Cases *** Handle Multiple Connections [Documentation] VES-HV Collector should handle multiple incoming transmissions - ${SIMULATORS_LIST}= Get Valid xNF Simulators 3 + ${SIMULATORS_LIST}= Get xNF Simulators Using Valid Certificates 3 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_SMALLER_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot index bc03de232..58f5cbc16 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot @@ -4,30 +4,28 @@ Library VesHvContainersUtilsLibrary Library Collections *** Keywords *** -Configure Valid xNF Simulators On Ports +Configure xNF Simulators Using Valid Certificates On Ports [Arguments] ${XNF_PORTS_LIST} - ${VALID_XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} ${true} + ${VALID_XNF_SIMULATORS_ADDRESSES}= Configure xNF Simulators ${XNF_PORTS_LIST} Set Suite Variable ${VALID_XNF_SIMULATORS_ADDRESSES} - -Configure Invalid xNF Simulators On Ports +Configure xNF Simulators [Arguments] ${XNF_PORTS_LIST} - ${INVALID_XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} ${false} - Set Suite Variable ${INVALID_XNF_SIMULATORS_ADDRESSES} - - -Get Valid xNF Simulators - [Arguments] ${AMOUNT} + ... ${should_use_valid_certs}=${true} + ... ${should_disable_ssl}=${false} + ... ${should_connect_to_unencrypted_hv_ves}=${false} + ${XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} + ... ${should_use_valid_certs} + ... ${should_disable_ssl} + ... ${should_connect_to_unencrypted_hv_ves} + [Return] ${XNF_SIMULATORS_ADDRESSES} + +Get xNF Simulators Using Valid Certificates + [Arguments] ${AMOUNT}=1 ${SIMULATORS}= Get Slice From List ${VALID_XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT} [Return] ${SIMULATORS} -Get Invalid xNF Simulators - [Arguments] ${AMOUNT} - ${SIMULATORS}= Get Slice From List ${INVALID_XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT} - [Return] ${SIMULATORS} - - Send Messages From xNF Simulators [Arguments] ${XNF_HOSTS_LIST} ${MESSAGE_FILEPATH} :FOR ${HOST} IN @{XNF_HOSTS_LIST} diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json index c71793d7d..75d938766 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json @@ -18,6 +18,6 @@ "sourceName": "sample-source-name" }, "messageType": "VALID", - "messagesAmount": 500000 + "messagesAmount": 5000 } ]
\ No newline at end of file diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json index 3235a0c0e..88a70b0db 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json @@ -1,6 +1,6 @@ { - "kafkaBootstrapServers": "kafka:9092", - "routing": [ + "dmaap.kafkaBootstrapServers": "kafka:9092", + "collector.routing": [ { "fromDomain": 11, "toTopic": "test-hv-ran-meas" diff --git a/test/csit/tests/dcaegen2/prh-testcases/__init__.robot b/test/csit/tests/dcaegen2/prh-testcases/__init__.robot index e69de29bb..f13ba6df8 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/__init__.robot +++ b/test/csit/tests/dcaegen2/prh-testcases/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Integration - PRH suite
\ No newline at end of file diff --git a/test/csit/tests/dcaegen2/prh-testcases/prh_tests.robot b/test/csit/tests/dcaegen2/prh-testcases/prh_tests.robot index b7013c4a2..5150a4b35 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/prh_tests.robot +++ b/test/csit/tests/dcaegen2/prh-testcases/prh_tests.robot @@ -10,7 +10,7 @@ Resource resources/prh_library.robot ${DMAAP_SIMULATOR_URL} http://${DMAAP_SIMULATOR} ${AAI_SIMULATOR_URL} http://${AAI_SIMULATOR} ${PRH_URL} http://${PRH} -${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"QTFCOC540002E", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} +${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} {"event": {"commonEventHeader": {"sourceName":"NOK6061ZW1"}, "pnfRegistrationFields": {"oamV4IpAddress":"10.16.123.234", "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} ${Not_json_format} "" *** Test Cases *** @@ -19,28 +19,18 @@ Valid DMaaP event can be converted to PNF_READY notification [Tags] PRH Valid event [Template] Valid event processing ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} - {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"QTFCOC540002G", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":""}}} - {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"QTFCOC540002F", "pnfOamIpv4Address":"", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} - {"event": {"otherFields": {"pnfVendorName":"Ericsson", "pnfSerialNumber":"QTFCOC5400000", "pnfOamIpv4Address":"", "pnfOamIpv6Address":"2001:0db8:85b3:0000:0000:8a2e:0370:7334"}}} + {"event": {"commonEventHeader": {"sourceName":"NOK6061ZW2"}, "pnfRegistrationFields": {"oamV4IpAddress":"10.17.123.234", "oamV6IpAddress":""}}} + {"event": {"commonEventHeader": {"sourceName":"ERI6061ZW3"}, "pnfRegistrationFields": {"oamV4IpAddress":"", "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8b2e:0370:7334"}}} Invalid DMaaP event cannot be converted to PNF_READY notification [Documentation] PRH get invalid event from DMaaP with missing required fields - PRH does not produce PNF_READY notification [Tags] PRH Invalid event [Template] Invalid event processing - {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"QTFCOC540002E", "pnfOamIpv4Address":"", "pnfOamIpv6Address":""}}} - {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} - {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":""}}} - {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"", "pnfOamIpv4Address":"", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} - {"event": {"otherFields": {"pnfVendorName":"Nokia", "pnfSerialNumber":"", "pnfOamIpv4Address":"", "pnfOamIpv6Address":""}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"QTFCOC540002E", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"QTFCOC540002E", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":""}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"QTFCOC540002E", "pnfOamIpv4Address":"", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"QTFCOC540002E", "pnfOamIpv4Address":"", "pnfOamIpv6Address":""}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"", "pnfOamIpv4Address":"10.16.123.234", "pnfOamIpv6Address":""}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"", "pnfOamIpv4Address":"", "pnfOamIpv6Address":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}}} - {"event": {"otherFields": {"pnfVendorName":"", "pnfSerialNumber":"", "pnfOamIpv4Address":"", "pnfOamIpv6Address":""}}} - ${Not_json_format} + {"event": {"commonEventHeader": {"sourceName":"NOK6061ZW4"}, "pnfRegistrationFields": {"oamV4IpAddress":"", "oamV6IpAddress":""}}} + {"event": {"commonEventHeader": {"sourceName":""}, "pnfRegistrationFields": {"oamV4IpAddress":"10.18.123.234", "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2a:0370:7334"}}} + {"event": {"commonEventHeader": {"sourceName":""}, "pnfRegistrationFields": {"oamV4IpAddress":"10.17.163.234", "oamV6IpAddress":""}}} + {"event": {"commonEventHeader": {"sourceName":""}, "pnfRegistrationFields": {"oamV4IpAddress":"", "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8b2f:0370:7334"}}} + {"event": {"commonEventHeader": {"sourceName":""}, "pnfRegistrationFields": {"oamV4IpAddress":"", "oamV6IpAddress":""}}} Get valid event from DMaaP and record in AAI does not exist [Documentation] PRH get valid event from DMaaP with all required fields and in AAI record doesn't exist - PRH does not produce PNF_READY notification @@ -48,7 +38,13 @@ Get valid event from DMaaP and record in AAI does not exist [Timeout] 30s Set PNF name in AAI wrong_aai_record Set event in DMaaP ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} - Wait Until Keyword Succeeds 100x 300ms Check PRH log org.onap.dcaegen2.services.prh.exceptions.AAINotFoundException: Incorrect response code for continuation of tasks workflow + Wait Until Keyword Succeeds 100x 300ms Check PRH log java.io.IOException: Connection closed prematurely + +Event in DMaaP is not JSON format + [Documentation] PRH get not JSON format event from DMaaP - PRH does not produce PNF_READY notification + [Tags] PRH + Set event in DMaaP ${Not_json_format} + Wait Until Keyword Succeeds 100x 300ms Check PRH log |java.lang.IllegalStateException: Not a JSON Array: Get valid event from DMaaP and AAI is not responding [Documentation] PRH get valid event from DMaaP with all required fields and AAI is not responding - PRH does not produce PNF_READY notification @@ -56,4 +52,4 @@ Get valid event from DMaaP and AAI is not responding [Timeout] 180s Stop AAI Set event in DMaaP ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} - Wait Until Keyword Succeeds 100x 300ms Check PRH log java.net.NoRouteToHostException: Host is unreachable (Host unreachable) + Wait Until Keyword Succeeds 100x 300ms Check PRH log java.net.UnknownHostException: aai diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py index ac3fba46e..7c52f5430 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py @@ -21,16 +21,18 @@ class PrhLibrary(object): @staticmethod def create_pnf_ready_notification(json_file): json_to_python = json.loads(json_file) - ipv4 = json_to_python["event"]["otherFields"]["pnfOamIpv4Address"] - ipv6 = json_to_python["event"]["otherFields"]["pnfOamIpv6Address"] - pnf_name = _create_pnf_name(json_file) - str_json = '{"pnf-name":"' + pnf_name + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}' + ipv4 = json_to_python["event"]["pnfRegistrationFields"]["oamV4IpAddress"] + ipv6 = json_to_python["event"]["pnfRegistrationFields"]["oamV6IpAddress"] + header = json_to_python["event"]["commonEventHeader"]["sourceName"] + str_json = '{"sourceName":"' + header + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}' python_to_json = json.dumps(str_json) return python_to_json.replace("\\", "")[1:-1] @staticmethod def create_pnf_name(json_file): - return _create_pnf_name(json_file) + json_to_python = json.loads(json_file) + header = json_to_python["event"]["commonEventHeader"]["sourceName"] + return header @staticmethod def stop_aai(): @@ -38,9 +40,7 @@ class PrhLibrary(object): container = client.containers.get('aai_simulator') container.stop() - -def _create_pnf_name(json_file): - json_to_python = json.loads(json_file) - vendor = json_to_python["event"]["otherFields"]["pnfVendorName"] - serial_number = json_to_python["event"]["otherFields"]["pnfSerialNumber"] - return vendor[:3].upper() + serial_number + def create_invalid_notification(self, json_file): + return self.create_pnf_ready_notification(json_file).replace("\":", "\": ")\ + .replace("ipaddress-v4-oam", "oamV4IpAddress").replace("ipaddress-v6-oam", "oamV6IpAddress")\ + .replace("}", "\\n}") diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml index b1f84fda2..67921e8e0 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml @@ -1,12 +1,15 @@ version: '3' services: prh: - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest command: > - --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222 - --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2222 - --aai.aaiClientConfiguration.aaiHostPortNumber=3333 - --aai.aaiClientConfiguration.aaiProtocol=http + --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap + --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222 + --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap + --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2222 + --aai.aaiClientConfiguration.aaiHostPortNumber=3333 + --aai.aaiClientConfiguration.aaiHost=aai + --aai.aaiClientConfiguration.aaiProtocol=http entrypoint: - java - -Dspring.profiles.active=dev @@ -18,10 +21,10 @@ services: - "8433:8433" container_name: prh depends_on: - - dmaap_simulator - - aai_simulator + - dmaap + - aai - dmaap_simulator: + dmaap: build: context: simulator dockerfile: DMaaP_simulator @@ -29,7 +32,7 @@ services: - "2222:2222" container_name: dmaap_simulator - aai_simulator: + aai: build: context: simulator dockerfile: AAI_simulator diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/test/csit/tests/dcaegen2/prh-testcases/resources/prh_library.robot index 10bc26c18..b7e339bc9 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -1,6 +1,7 @@ *** Settings *** Library RequestsLibrary Library Collections +Library PrhLibrary.py *** Keywords *** Create header @@ -17,8 +18,10 @@ Invalid event processing [Arguments] ${input_invalid_event_in_dmaap} [Timeout] 30s Set event in DMaaP ${input_invalid_event_in_dmaap} - Wait Until Keyword Succeeds 100x 100ms Check PRH log INFO 1 --- [pool-2-thread-1] o.o.d.s.prh.tasks.DmaapConsumerTaskImpl \ : Consumed model from DmaaP: ${input_invalid_event_in_dmaap} - + ${invalid_notification}= Create invalid notification ${input_invalid_event_in_dmaap} + ${notification}= Catenate SEPARATOR= \\n |org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException: Incorrect json, consumerDmaapModel can not be created: ${invalid_notification} + Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification} + Valid event processing [Arguments] ${input_valid_event_in_dmaap} [Timeout] 30s diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py index e70d8d30f..c57903c30 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py @@ -7,6 +7,7 @@ pnfs = 'Empty' class AAIHandler(BaseHTTPRequestHandler): + def do_PUT(self): if re.search('/set_pnfs', self.path): global pnfs diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator index 013cd0a65..89a266ebe 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator @@ -1,4 +1,12 @@ -FROM python:3 +FROM alpine:3.8 + +RUN apk add --no-cache python3 && \ + python3 -m ensurepip && \ + rm -r /usr/lib/python*/ensurepip && \ + pip3 install --upgrade pip setuptools && \ + if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ + if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \ + rm -r /root/.cache ADD AAI.py / diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py index 210378421..96e22a141 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py @@ -8,6 +8,7 @@ received_event_to_get_method = 'Empty' class DMaaPHandler(BaseHTTPRequestHandler): + def do_PUT(self): if re.search('/set_get_event', self.path): global received_event_to_get_method @@ -27,7 +28,7 @@ class DMaaPHandler(BaseHTTPRequestHandler): return def do_GET(self): - if re.search('/events/unauthenticated.SEC_OTHER_OUTPUT/OpenDcae-c12/c12', self.path): + if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12', self.path): _header_200_and_json(self) self.wfile.write(received_event_to_get_method) elif re.search('/events/pnfReady', self.path): diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator index cf4160c89..9cf21dc92 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator @@ -1,4 +1,12 @@ -FROM python:3 +FROM alpine:3.8 + +RUN apk add --no-cache python3 && \ + python3 -m ensurepip && \ + rm -r /usr/lib/python*/ensurepip && \ + pip3 install --upgrade pip setuptools && \ + if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ + if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \ + rm -r /root/.cache ADD DMaaP.py / diff --git a/test/csit/tests/policy/apex-pdp/apex-pdp-test.robot b/test/csit/tests/policy/apex-pdp/apex-pdp-test.robot new file mode 100644 index 000000000..f1dea17d1 --- /dev/null +++ b/test/csit/tests/policy/apex-pdp/apex-pdp-test.robot @@ -0,0 +1,14 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Test Cases *** + +Call Apex Policy + Create Session apexSession http://${APEX_IP}:23324 max_retries=3 + ${data}= Get Binary File ${CURDIR}${/}data${/}event.json + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Put Request apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/test/csit/tests/policy/apex-pdp/data/event.json b/test/csit/tests/policy/apex-pdp/data/event.json new file mode 100644 index 000000000..9dbf2790b --- /dev/null +++ b/test/csit/tests/policy/apex-pdp/data/event.json @@ -0,0 +1,11 @@ +{ + "nameSpace": "org.onap.policy.apex.sample.events", + "name": "Event0000", + "version": "0.0.1", + "source": "REST_0", + "target": "apex", + "TestSlogan": "Test slogan for External Event0", + "TestMatchCase": 3, + "TestTimestamp": 1536363522018, + "TestTemperature": 9080.866 +} diff --git a/test/csit/tests/policy/suite1/global_properties.robot b/test/csit/tests/policy/suite1/global_properties.robot index 911fdaff9..60826bbc3 100644 --- a/test/csit/tests/policy/suite1/global_properties.robot +++ b/test/csit/tests/policy/suite1/global_properties.robot @@ -25,6 +25,6 @@ ${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pv ${GLOBAL_POLICY_SERVER_URL} https://%{PDP_IP}:8081 ${GLOBAL_POLICY_AUTH} dGVzdHBkcDphbHBoYTEyMw== ${GLOBAL_POLICY_CLIENTAUTH} cHl0aG9uOnRlc3Q= -${GLOBAL_POLICY_HEALTHCHECK_URL} http://%{POLICY_IP}:6969 +${GLOBAL_POLICY_HEALTHCHECK_URL} https://%{POLICY_IP}:6969 ${GLOBAL_POLICY_USERNAME} healthcheck ${GLOBAL_POLICY_PASSWORD} zb!XztG34 diff --git a/test/csit/tests/sdnc/healthcheck/test1.robot b/test/csit/tests/sdnc/healthcheck/test1.robot index 4bf3d25e7..c002a1892 100644 --- a/test/csit/tests/sdnc/healthcheck/test1.robot +++ b/test/csit/tests/sdnc/healthcheck/test1.robot @@ -14,32 +14,31 @@ ${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} /operations/VNF-API:preload-vnf-topology Healthcheck API Create Session sdnc http://localhost:8282/restconf - ${data}= Get Binary File ${CURDIR}${/}data${/}data.json + ${data}= Get File ${CURDIR}${/}data${/}data.json &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json ${resp}= Post Request sdnc ${SDN_HEALTHCHECK_OPERATION_PATH} data=${data} headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 Should Be Equal As Strings ${resp.json()['output']['response-code']} 200 - + Check SLI-API Create Session sdnc http://localhost:8282 &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json ${resp}= Get Request sdnc ${SDN_APIDOCS_URI} headers=${headers} - Log ${resp.content} - Should Contain ${resp.content} SLI-API + Log ${resp.text} + Should Contain ${resp.text} SLI-API Check VNF-API Create Session sdnc http://localhost:8282 &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json ${resp}= Get Request sdnc ${SDN_APIDOCS_URI} headers=${headers} - Log ${resp.content} - Should Contain ${resp.content} VNF-API + Log ${resp.text} + Should Contain ${resp.text} VNF-API Test Preload Create Session sdnc http://localhost:8282/restconf - ${data}= Get Binary File ${CURDIR}${/}data${/}preload.json + ${data}= Get File ${CURDIR}${/}data${/}preload.json &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json ${resp}= Post Request sdnc ${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} data=${data} headers=${headers} - Log ${resp.content} + Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Should Be Equal As Strings ${resp.json()['output']['response-code']} 200 - diff --git a/test/csit/tests/vfc/nfvo-wfengine/workflow.robot b/test/csit/tests/vfc/nfvo-wfengine/workflow.robot index c9dbe6c46..8039ae177 100644 --- a/test/csit/tests/vfc/nfvo-wfengine/workflow.robot +++ b/test/csit/tests/vfc/nfvo-wfengine/workflow.robot @@ -80,34 +80,34 @@ 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 - ${headers} Create Dictionary Content-Type=application/json Accept=application/json Authorization=Basic a2VybWl0Omtlcm1pdA== - Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} - ${body} Create Dictionary processDefinitionKey=${processId} - ${body} dumps ${body} - ${resp}= Post Request web_session api/workflow/v1/process/instance ${body} - Should Be Equal ${resp.status_code} ${200} - Log ${resp.json()} - Should Be Equal ${resp.json()["processDefinitionKey"]} ${processId} +# Exectue BPMN File Testt On MSB +# [Documentation] Check if the test bpmn file can be exectued in MSB +# ${headers} Create Dictionary Content-Type=application/json Accept=application/json Authorization=Basic a2VybWl0Omtlcm1pdA== +# Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} +# ${body} Create Dictionary processDefinitionKey=${processId} +# ${body} dumps ${body} +# ${resp}= Post Request web_session api/workflow/v1/process/instance ${body} +# Should Be Equal ${resp.status_code} ${200} +# Log ${resp.json()} +# Should Be Equal ${resp.json()["processDefinitionKey"]} ${processId} -UnDeploy BPMN File Testt On MSB - [Documentation] Check if the test bpmn file can be undeployed in MSB - log ${deployedId} - ${auth}= Create List kermit kermit - ${headers} Create Dictionary Content-Type=application/json Accept=application/json - Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} auth=${auth} - ${resp}= Delete Request web_session /api/workflow/v1/package/${deployedId} - Should Be Equal ${resp.status_code} ${200} +# UnDeploy BPMN File Testt On MSB +# [Documentation] Check if the test bpmn file can be undeployed in MSB +# log ${deployedId} +# ${auth}= Create List kermit kermit +# ${headers} Create Dictionary Content-Type=application/json Accept=application/json +# Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} auth=${auth} +# ${resp}= Delete Request web_session /api/workflow/v1/package/${deployedId} +# Should Be Equal ${resp.status_code} ${200} diff --git a/test/csit/tests/vid/resources/docker-compose.yml b/test/csit/tests/vid/resources/docker-compose.yml index 93b317001..879c23d47 100644 --- a/test/csit/tests/vid/resources/docker-compose.yml +++ b/test/csit/tests/vid/resources/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: vid-server: - image: nexus3.onap.org:10001/onap/vid:latest + image: nexus3.onap.org:10001/onap/vid:3.0-STAGING-latest environment: - VID_MYSQL_DBNAME=vid_openecomp_epsdk - VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U @@ -23,7 +23,6 @@ services: container_name: vid-mariadb volumes: - ${WORKSPACE}/data/clone/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf - - ${WORKSPACE}/data/clone/vid/lf_config/vid-schema.sql:/docker-entrypoint-initdb.d/vid-schema.sql - /var/lib/mysql sdc_simulator: |