aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests')
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py20
-rw-r--r--test/csit/tests/usecases/5G-bulkpm/BulkpmE2E.robot (renamed from test/csit/tests/dcae-bulkpm/testcases/e2e.robot)39
-rw-r--r--test/csit/tests/usecases/5G-bulkpm/__init__.robot (renamed from test/csit/tests/dcae-bulkpm/testcases/__init__.robot)0
-rw-r--r--test/csit/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json (renamed from test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json)21
-rw-r--r--test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot (renamed from test/csit/tests/dcae-bulkpm/testcases/resources/ves_keywords.robot)3
-rw-r--r--test/csit/tests/usecases/5G-bulkpm/resources/xNFLibrary.py (renamed from test/csit/tests/dcae-bulkpm/testcases/resources/VesLibrary.py)4
6 files changed, 60 insertions, 27 deletions
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/dcae-bulkpm/testcases/e2e.robot b/test/csit/tests/usecases/5G-bulkpm/BulkpmE2E.robot
index 69c795341..9098b1abe 100644
--- a/test/csit/tests/dcae-bulkpm/testcases/e2e.robot
+++ b/test/csit/tests/usecases/5G-bulkpm/BulkpmE2E.robot
@@ -3,7 +3,8 @@ 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
+Library Process
+Resource resources/bulkpm_keywords.robot
*** Variables ***
@@ -11,23 +12,33 @@ ${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
+${EVENT_DATA_FILE} %{WORKSPACE}/test/csit/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.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
+${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov
+${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz"
+
*** Test Cases ***
Send VES File Ready Event to VES Collector
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event and expect 200 Response
+ [Tags] Bulk_PM_E2E_01
+ [Documentation] Send VES File Ready Event
${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}
+ Sleep 2s
+ ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
+ Sleep 2s
+ ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
+ Sleep 2s
+ ${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
+ [Tags] Bulk_PM_E2E_02
+ [Documentation] Get the VES Notification topic on message router
[Timeout] 1 minute
Sleep 10s
${resp}= GetCall ${TARGETURL_TOPICS}
@@ -38,3 +49,21 @@ Check VES Notification Topic is existing in Message Router
${ListLength}= Get Length ${topics}
log ${ListLength}
List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT
+
+Verify Downloaded PM file from xNF exist on Data File Collector
+ [Tags] Bulk_PM_E2E_03
+ [Documentation] Check the PM XML file exists on the File Consumer Simulator
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
+
+
+Verify Default Feed And File Consumer Subscription On Datarouter
+ [Tags] Bulk_PM_E2E_04
+ [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
+ Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 \ No newline at end of file
diff --git a/test/csit/tests/dcae-bulkpm/testcases/__init__.robot b/test/csit/tests/usecases/5G-bulkpm/__init__.robot
index 7114fd447..7114fd447 100644
--- a/test/csit/tests/dcae-bulkpm/testcases/__init__.robot
+++ b/test/csit/tests/usecases/5G-bulkpm/__init__.robot
diff --git a/test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json b/test/csit/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json
index 96068e39a..4064ea312 100644
--- a/test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json
+++ b/test/csit/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json
@@ -18,13 +18,16 @@
"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"
- }
- }
+ "arrayOfNamedHashMap": [
+ { "name": "xNF.pm.xml.gz",
+ "hashMap":{
+ "location": "sftp://admin:admin@sftpserver:22/xNF.pm.xml.gz",
+ "compression": "gzip",
+ "fileFormatType": "org.3GPP.32.435#measCollec",
+ "fileFormatVersion": "V10"
+ }
+ }
+ ]
}
- } \ No newline at end of file
+}
+} \ No newline at end of file
diff --git a/test/csit/tests/dcae-bulkpm/testcases/resources/ves_keywords.robot b/test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot
index 76bc33f47..6859ea0df 100644
--- a/test/csit/tests/dcae-bulkpm/testcases/resources/ves_keywords.robot
+++ b/test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot
@@ -1,7 +1,7 @@
*** 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 ../resources/xNFLibrary.py
Library OperatingSystem
Library Collections
Library requests
@@ -36,4 +36,3 @@ GetCall
[Arguments] ${url}
${resp}= Evaluate requests.get('${url}') requests
[Return] ${resp}
- \ No newline at end of file
diff --git a/test/csit/tests/dcae-bulkpm/testcases/resources/VesLibrary.py b/test/csit/tests/usecases/5G-bulkpm/resources/xNFLibrary.py
index d1ec9811d..01574f778 100644
--- a/test/csit/tests/dcae-bulkpm/testcases/resources/VesLibrary.py
+++ b/test/csit/tests/usecases/5G-bulkpm/resources/xNFLibrary.py
@@ -7,7 +7,7 @@ from robot.api import logger
from Queue import Queue
import uuid, time, json, threading,os, platform, subprocess,paramiko
-class VesLibrary(object):
+class xNFLibrary(object):
def __init__(self):
pass
@@ -21,5 +21,5 @@ class VesLibrary(object):
return uuid.uuid4()
if __name__ == '__main__':
- lib = VesLibrary()
+ lib = xNFLibrary()
time.sleep(100000) \ No newline at end of file