Merge "Xacml-PDP CSIT tests with DmaaP Simulator"
diff --git a/scripts/sdc/docker_health.sh b/scripts/sdc/docker_health.sh
index 4264b1a..30efd39 100644
--- a/scripts/sdc/docker_health.sh
+++ b/scripts/sdc/docker_health.sh
@@ -2,22 +2,21 @@
curl localhost:9200/_cluster/health?pretty=true
-echo "BE health-Check:"
+echo "BE Health Check:"
curl http://localhost:8080/sdc2/rest/healthCheck
echo ""
echo ""
-echo "FE health-Check:"
+echo "FE Health Check:"
curl http://localhost:8181/sdc1/rest/healthCheck
-
echo ""
echo ""
http_code=$(curl -o out.html -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://localhost:8080/sdc2/rest/v1/user/demo;)
if [[ ${http_code} != 200 ]]
then
- echo "Error [${http_code}] while user existance check"
+ echo "Error [${http_code}] while checking existence of user"
return ${http_code}
fi
-echo "check user existance: OK"
+echo "Check user existence: OK"
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-pnf-ready-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-pnf-ready-event.json
index 9da0201..0ccc1df 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-pnf-ready-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-pnf-ready-event.json
@@ -1,6 +1,8 @@
-{
- "additionalFields": {
- "attachmentPoint": "bbs-link"
- },
- "correlationId": "NOK6061ZW9"
-}
+[
+ {
+ "additionalFields": {
+ "attachmentPoint": "bbs-link"
+ },
+ "correlationId": "NOK6061ZW9"
+ }
+]
\ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/expected-pnf-ready-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/expected-pnf-ready-event.json
index 6c92285..7d6c240 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/expected-pnf-ready-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/expected-pnf-ready-event.json
@@ -1,3 +1,5 @@
-{
- "correlationId": "NOK6061ZW8"
-}
+[
+ {
+ "correlationId": "NOK6061ZW8"
+ }
+]
\ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/expected-pnf-ready-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/expected-pnf-ready-event.json
index 75cb4a2..d2cf954 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/expected-pnf-ready-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/expected-pnf-ready-event.json
@@ -1,6 +1,8 @@
-{
- "additionalFields": {
- "attachmentPoint": ""
- },
- "correlationId": "NOK6061ZW8"
-}
+[
+ {
+ "additionalFields": {
+ "attachmentPoint": ""
+ },
+ "correlationId": "NOK6061ZW8"
+ }
+]
\ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/expected-pnf-ready-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/expected-pnf-ready-event.json
index 4ac7f6e..7d6c240 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/expected-pnf-ready-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/expected-pnf-ready-event.json
@@ -1,3 +1,5 @@
-{
- "correlationId": "NOK6061ZW8"
-}
\ No newline at end of file
+[
+ {
+ "correlationId": "NOK6061ZW8"
+ }
+]
\ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
index 5680f2f..bdf12ac 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot
+++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
@@ -96,8 +96,12 @@
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As JSON
- [Arguments] ${given} ${expected}
- Should Be True ${given}==${expected}
+ [Arguments] ${actual} ${expected}
+ Log EXPECTED: ${expected}
+ Log ACTUAL: ${actual}
+ ${expected_json}= Evaluate json.loads("""${expected}""") json
+ ${actual_json}= Evaluate json.loads("""${actual}""") json
+ Should Be Equal ${actual_json} ${expected_json}
Create sessions
Create Session dmaap_setup_session ${DMAAP_SIMULATOR_SETUP_URL}
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
index 92985cb..7507a46 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
@@ -41,7 +41,7 @@
global ves_event
ves_event = httpServerLib.get_payload(self)
httpServerLib.set_response_200_ok(self)
- logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK')
+ logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK, content: ' + ves_event.decode("utf-8"))
else:
httpServerLib.set_response_404_not_found(self)
logger.info('DmaapSetup PUT ' + self.path + ' -> 404 Not found')
@@ -73,7 +73,8 @@
global captured_prh_event
captured_prh_event = httpServerLib.get_payload(self)
httpServerLib.set_response_200_ok(self)
- logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200')
+ logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200, content: '
+ + captured_prh_event.decode("utf-8"))
else:
httpServerLib.set_response_404_not_found(self)
logger.info('DMaaPHandler POST ' + self.path + ' -> 404 Not found')
@@ -86,6 +87,9 @@
if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDCAE-c12/c12', self.path):
global ves_event
httpServerLib.set_response_200_ok(self, payload = ves_event)
+ logger.debug(
+ 'DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200, content: '
+ + ves_event.decode("utf-8"))
ves_event = DMAAP_EMPTY
logger.debug('DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200')
else: