From d801fdc32a34621aed239f5429c55cda0344eac9 Mon Sep 17 00:00:00 2001 From: romaingimbert Date: Thu, 7 Mar 2019 09:23:10 +0100 Subject: Improve nbi status -add components to check connectivity with onap (sdc, aai, so, dmaap) -activate full status with ?fullStatus=true -change test -change mock tests folders Change-Id: Iddcd7fce3c1b3b5abfea14c46b2f611f27057319 Issue-ID: EXTAPI-209 Signed-off-by: romaingimbert --- .../mappings/so/so_delete_service_instance.json | 18 ++++++++++++++++ .../so/so_e2e_delete_service_instance.json | 15 +++++++++++++ src/test/resources/mappings/so/so_get_.json | 20 +++++++++++++++++ src/test/resources/mappings/so/so_get_e2e.json | 25 ++++++++++++++++++++++ .../resources/mappings/so/so_get_e2e_delete.json | 25 ++++++++++++++++++++++ .../resources/mappings/so/so_get_healthcheck.json | 12 +++++++++++ src/test/resources/mappings/so/so_healthcheck.xml | 23 ++++++++++++++++++++ .../so/so_post_create_service_instance.json | 18 ++++++++++++++++ .../so/so_post_e2e_create_service_instance.json | 18 ++++++++++++++++ 9 files changed, 174 insertions(+) create mode 100644 src/test/resources/mappings/so/so_delete_service_instance.json create mode 100644 src/test/resources/mappings/so/so_e2e_delete_service_instance.json create mode 100644 src/test/resources/mappings/so/so_get_.json create mode 100644 src/test/resources/mappings/so/so_get_e2e.json create mode 100644 src/test/resources/mappings/so/so_get_e2e_delete.json create mode 100644 src/test/resources/mappings/so/so_get_healthcheck.json create mode 100644 src/test/resources/mappings/so/so_healthcheck.xml create mode 100644 src/test/resources/mappings/so/so_post_create_service_instance.json create mode 100644 src/test/resources/mappings/so/so_post_e2e_create_service_instance.json (limited to 'src/test/resources/mappings/so') diff --git a/src/test/resources/mappings/so/so_delete_service_instance.json b/src/test/resources/mappings/so/so_delete_service_instance.json new file mode 100644 index 0000000..92a713d --- /dev/null +++ b/src/test/resources/mappings/so/so_delete_service_instance.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "DELETE", + "url": "/onap/so/infra/serviceInstantiation/v7/serviceInstances/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" + }, + "response": { + "status": 202, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "requestReferences": { + "instanceId": "instanceId", + "requestId": "requestId" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_e2e_delete_service_instance.json b/src/test/resources/mappings/so/so_e2e_delete_service_instance.json new file mode 100644 index 0000000..ea7b446 --- /dev/null +++ b/src/test/resources/mappings/so/so_e2e_delete_service_instance.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "DELETE", + "url": "/onap/so/infra/e2eServiceInstances/v3/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" + }, + "response": { + "status": 202, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "operationId": "operationId" + } + } +} diff --git a/src/test/resources/mappings/so/so_get_.json b/src/test/resources/mappings/so/so_get_.json new file mode 100644 index 0000000..a251e69 --- /dev/null +++ b/src/test/resources/mappings/so/so_get_.json @@ -0,0 +1,20 @@ +{ + "request": { + "method": "GET", + "url": "/onap/so/infra/orchestrationRequests/v7/requestId" + }, + "response": { + "status": 200, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "request": { + "requestStatus": { + "requestState": "COMPLETE", + "percentProgress": 100 + } + } + } + } +} diff --git a/src/test/resources/mappings/so/so_get_e2e.json b/src/test/resources/mappings/so/so_get_e2e.json new file mode 100644 index 0000000..530cd84 --- /dev/null +++ b/src/test/resources/mappings/so/so_get_e2e.json @@ -0,0 +1,25 @@ +{ +"request": { + "method": "GET", + "url": "/onap/so/infra/e2eServiceInstances/v3/serviceId/operations/operationId" + }, + "response": { + "status": 200, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "operation": { + "operationId": "operationid", + "operation": "create", + "result": "finished", + "reason": "", + "userid": "", + "operationContent": "Creating E2E SOTN Service", + "progress": "100", + "operateAt": "", + "finishedAt": "" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_get_e2e_delete.json b/src/test/resources/mappings/so/so_get_e2e_delete.json new file mode 100644 index 0000000..34247e0 --- /dev/null +++ b/src/test/resources/mappings/so/so_get_e2e_delete.json @@ -0,0 +1,25 @@ +{ + "request": { + "method": "GET", + "url": "/onap/so/infra/e2eServiceInstances/v3/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb/operations/operationId" + }, + "response": { + "status": 200, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "operation": { + "operationId": "operationid", + "operation": "create", + "result": "finished", + "reason": "", + "userid": "", + "operationContent": "Creating E2E SOTN Service", + "progress": 100, + "operateAt": "", + "finishedAt": "" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_get_healthcheck.json b/src/test/resources/mappings/so/so_get_healthcheck.json new file mode 100644 index 0000000..8f2171d --- /dev/null +++ b/src/test/resources/mappings/so/so_get_healthcheck.json @@ -0,0 +1,12 @@ +{ + "request": { + "method": "GET", + "url": "/globalhealthcheck" + }, + "response": { + "status": 200, + "jsonBody": { + "bodyFileName": "so_healthcheck.xml" + } + } +} diff --git a/src/test/resources/mappings/so/so_healthcheck.xml b/src/test/resources/mappings/so/so_healthcheck.xml new file mode 100644 index 0000000..d023c9f --- /dev/null +++ b/src/test/resources/mappings/so/so_healthcheck.xml @@ -0,0 +1,23 @@ + + + + + + Health Check + + Application ready + \ No newline at end of file diff --git a/src/test/resources/mappings/so/so_post_create_service_instance.json b/src/test/resources/mappings/so/so_post_create_service_instance.json new file mode 100644 index 0000000..8d319f6 --- /dev/null +++ b/src/test/resources/mappings/so/so_post_create_service_instance.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "POST", + "url": "/onap/so/infra/serviceInstantiation/v7/serviceInstances/" + }, + "response": { + "status": 201, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "requestReferences": { + "instanceId": "instanceId", + "requestId": "requestId" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_post_e2e_create_service_instance.json b/src/test/resources/mappings/so/so_post_e2e_create_service_instance.json new file mode 100644 index 0000000..a357bef --- /dev/null +++ b/src/test/resources/mappings/so/so_post_e2e_create_service_instance.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "POST", + "url": "/onap/so/infra/e2eServiceInstances/v3" + }, + "response": { + "status": 201, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "service": { + "serviceId": "serviceId", + "operationId": "operationId" + } + } + } +} -- cgit 1.2.3-korg