Commit 030bb269 authored by Elian Kraja's avatar Elian Kraja
Browse files

Fix on json schema check

parent 7ec8d395
*** Settings ***
Resource environment/variables.txt
Library REST ${VNF_SCHEMA}://${VNF_HOST}:${VNF_PORT}
... spec=SOL002-VNFConfiguration-API.yaml
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library OperatingSystem
Library DependencyLibrary
*** Variables ***
${Etag}= an etag
${Etag_modified}= 12345
${response}= httpresponse
*** Test Cases ***
POST Configuration - Method not implemented
......@@ -81,7 +76,7 @@ DELETE Config - Method not implemented
Log Validate Status code
Integer response status 405
*** Keywords ***
*** Keywords ***
Get VNF configuration
Log Query VNF The GET method queries information about a configuration.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -122,8 +117,7 @@ Check HTTP Response Body Json Schema Is
[Arguments] ${schema}
${contentType}= Get Value From Json ${response.headers} $..Content-Type
Should Be Equal ${contentType} ${CONTENT_TYPE}
${json}= evaluate json.loads('''${response.body}''') json
Validate Json ${schema} ${json}
Validate Json ${schema} ${response.body}
Log Json Schema Validation OK
Check Postcondition VNF Configuration Untouched
......
*** Variables ***
${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${VNF_HOST} localhost # Hostname of the NFVO
${VNF_PORT} 8081 # Listening port of the NFVO
${VNFM_SCHEMA} https
${VNF_SCHEMA} https
${Etag}= an etag
${Etag_modified}= 12345
${response}= httpresponse
${EM-VNF_HOST} localhost # Hostname of the NFVO
${EM-VNF_PORT} 8081 # Listening port of the NFVO
${EM-VNF_SCHEMA} https
${ACCEPT} application/json
${AUTH_USAGE} 1
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${CONTENT_TYPE_PATCH} application/merge-patch+json
${ACCEPT} application/json
${apiRoot} /
${apiName} vnfconfig
${apiVersion} v1
${AUTH_USAGE} 1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${alarm_filter} managedObjectId
${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c
${invalid_alarm_filter} badFilter
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${vnfInstanceDescription} description vnf
${vnfInstanceDescription_Update} Updated description vnf
${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
${ACCEPT_PLAIN} text/plain
${ACCEPT_ZIP} application/zip
${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
${ARTIFACT_TYPE} application/octet-stream
${ARTIFACT_ID} artifactId
${WRONG_ACCEPT} application/json
${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${CancelMode} GRACEFUL
${LccnSubscriptionRequest} {}
${NVFM_DUPLICATION} 0
${sub_filter} filter
${sub_filter_invalid} filter_invalid
${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notification_ep} /notification
${notification_port} 9091
${AlarmNotification} {}
${AlarmClearedNotification} {}
${AlarmListRebuiltNotification} {}
${PerceivedSeverity} CRITICAL
\ No newline at end of file
${apiVersion} v1
......@@ -2,7 +2,6 @@
# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL002-VNFFaultManagement-API.yaml
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library OperatingSystem
......@@ -35,8 +34,7 @@ Get information about multiple alarms
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json alarms.schema.json ${json}
Validate Json alarms.schema.json ${result}
Log Validation OK
Get information about multiple alarms with filters
......@@ -58,8 +56,7 @@ Get information about multiple alarms with filters
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json alarms.schema.json ${json}
Validate Json alarms.schema.json ${result}
Log Validation OK
Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters
......@@ -78,8 +75,7 @@ Get information about multiple alarms Bad Request Invalid attribute-based filter
Log Validate Status code
Integer response status 400
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PUT Alarms - Method not implemented
......
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL002-VNFFaultManagement-API.yaml
Suite Setup Check resource existance
*** Test Cases ***
......
......@@ -2,7 +2,6 @@
# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL002-VNFFaultManagement-API.yaml
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
......@@ -42,8 +41,7 @@ Get information about a configuration
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json alarm.schema.json ${json}
Validate Json alarm.schema.json ${result}
Log Validation OK
PUT Alarm - Method not implemented
......@@ -75,8 +73,7 @@ PATCH Alarm
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json alarmModifications.schema.json ${json}
Validate Json alarmModifications.schema.json ${result}
Log Validation OK
PATCH Alarm - Conflict
......@@ -98,8 +95,7 @@ PATCH Alarm - Conflict
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PATCH Alarm - Precondition failed
......@@ -122,8 +118,7 @@ PATCH Alarm - Precondition failed
Log Validate Status code
Integer response status 412
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
DELETE Alarm - Method not implemented
......
......@@ -3,7 +3,6 @@ Resource environment/variables.txt
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL002-VNFFaultManagement-API.yaml
Documentation This resource represents an individual subscription for VNF alarms.
... The client can use this resource to read and to terminate a subscription to notifications related to VNF fault management.
Suite Setup Check resource existance
......@@ -36,8 +35,7 @@ Get Information about an individual subscription
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json FmSubscription.schema.json ${json}
Validate Json FmSubscription.schema.json ${result}
Log Validation OK
PUT an individual subscription - Method not implemented
......
......@@ -5,7 +5,6 @@ Suite Teardown Terminate All Processes kill=true
Library MockServerLibrary
Library Process
Library OperatingSystem
Library REST ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port}
*** Test Cases ***
Deliver a notification - Alarm
......@@ -21,13 +20,13 @@ Deliver a notification - Alarm
${json}= Get File schemas/alarmNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY}
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${notification_ep}
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm Clearance
[Documentation] Test ID: 7.4.5.2
......@@ -42,13 +41,13 @@ Deliver a notification - Alarm Clearance
${json}= Get File schemas/alarmClearedNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY}
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${notification_ep}
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm List Rebuilt
[Documentation] Test ID: 7.4.5.3
......@@ -63,13 +62,13 @@ Deliver a notification - Alarm List Rebuilt
${json}= Get File schemas/alarmListRebuiltNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY}
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${notification_ep}
Clear Requests ${callback_endpoint}
Test a notification end point
[Documentation] Test ID: 7.4.5.4
......@@ -81,36 +80,48 @@ Test a notification end point
... Applicability:
... Post-Conditions:
log The GET method allows the server to test the notification endpoint
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${notification_ep}
Log Validate Status code
Integer response status 204
Log Validation OK
&{req}= Create Mock Request Matcher GET ${callback_endpoint}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Verify Mock Expectation ${req}
Clear Requests ${callback_endpoint}
PUT notification - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Put ${notification_ep}
Log Validate Status code
Output response
Integer response status 405
Log PUT Method not implemented
&{req}= Create Mock Request Matcher PUT ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
PATCH subscriptions - Method not implemented
log Trying to perform a PATCH. This method should not be implemented
Patch ${notification_ep}
Log Validate Status code
Output response
Integer response status 405
Log PATCH Method not implemented
&{req}= Create Mock Request Matcher PATCH ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
DELETE subscriptions - Method not implemented
log Trying to perform a DELETE. This method should not be implemented
Delete ${notification_ep}
Log Validate Status code
Output response
Integer response status 405
Log DELETE Method not implemented
&{req}= Create Mock Request Matcher DELETE ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${notification_port} alias=mockInstance
Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port} #The API producer is set to NFVO according to SOL002-7.3.4
\ No newline at end of file
Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-7.3.4
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL002-VNFFaultManagement-API.yaml
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
......@@ -29,8 +28,7 @@ Create a new subscription
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json FmSubscription.schema.json ${json}
Validate Json FmSubscription.schema.json ${result}
Log Validation OK
Create a new Subscription - DUPLICATION
......@@ -43,7 +41,7 @@ Create a new Subscription - DUPLICATION
... Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists
... Post-Conditions:
Log Trying to create a subscription with an already created content
Pass Execution If ${NVFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test
Pass Execution If ${VNFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test
Set Headers {"Accept": "${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
......@@ -54,8 +52,7 @@ Create a new Subscription - DUPLICATION
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json FmSubscription.schema.json ${json}
Validate Json FmSubscription.schema.json ${result}
Log Validation OK
Create a new Subscription - NO-DUPLICATION
......@@ -68,7 +65,7 @@ Create a new Subscription - NO-DUPLICATION
... Applicability: the VNFM decides to not create a duplicate subscription resource
... Post-Conditions:
Log Trying to create a subscription with an already created content
Pass Execution If ${NVFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test
Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test
Set Headers {"Accept": "${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
......@@ -98,8 +95,7 @@ GET Subscriptions
Log Validate Status code
Integer response status 200
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json FmSubscriptions.schema.json ${json}
Validate Json FmSubscriptions.schema.json ${result}
Log Validation OK
GET Subscription - Filter
......@@ -118,8 +114,7 @@ GET Subscription - Filter
Integer response status 200
Log Received a 200 OK as expected
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json FmSubscriptions.schema.json ${json}
Validate Json FmSubscriptions.schema.json ${result}
Log Validation OK
GET subscriptions - Bad Request Invalid attribute-based filtering parameters
......@@ -140,8 +135,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PUT subscriptions - Method not implemented
......
*** Variables ***
${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${CONSUMER_HOST} localhost # Hostname of the NFVO
${CONSUMER_PORT} 8081 # Listening port of the NFVO
${VNFM_SCHEMA} https
${CONSUMER_SCHEMA} https
${apiRoot} /
${apiName} vnffm
${apiVersion} v1
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${CONTENT_TYPE_PATCH} application/merge-patch+json
${ACCEPT} application/json
${apiRoot} /
${apiName} vnffm
${apiVersion} v1
${AUTH_USAGE} 1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${alarm_filter} managedObjectId
${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c
${invalid_alarm_filter} badFilter
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${vnfInstanceDescription} description vnf
${vnfInstanceDescription_Update} Updated description vnf
${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
${ACCEPT_PLAIN} text/plain
${ACCEPT_ZIP} application/zip
${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
${ARTIFACT_TYPE} application/octet-stream
${ARTIFACT_ID} artifactId
${WRONG_ACCEPT} application/json
${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${CancelMode} GRACEFUL
${LccnSubscriptionRequest} {}
${NVFM_DUPLICATION} 0
${VNFM_DUPLICATION} 0
${sub_filter} filter
${sub_filter_invalid} filter_invalid
${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notification_ep} /notification
${notification_port} 9091
${AlarmNotification} {}
${AlarmClearedNotification} {}
${AlarmListRebuiltNotification} {}
${PerceivedSeverity} CRITICAL
${sleep_interval} 20s
\ No newline at end of file
${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_error} /endpoint_404
${sleep_interval} 20s
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Resource environment/individualSubscription.txt
Library OperatingSystem
Library REST ${PRODUCER_SCHEMA}://${PRODUCER_HOST}:${PRODUCER_PORT}
......@@ -16,9 +16,8 @@ GET Individual Subscription
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Log Trying to validate result with VnfIndicatorSubscription schema
Validate Json VnfIndicatorSubscription.schema.json ${json}
Validate Json VnfIndicatorSubscription.schema.json ${result}
Log Validated VnfIndicatorSubscription schema
GET Subscription - Negative (Not Found)
......@@ -31,9 +30,8 @@ GET Subscription - Negative (Not Found)
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
DELETE Subscription
......@@ -54,9 +52,8 @@ DELETE Subscription - Negative (Not Found)
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
${problemDetails}= Output
${json}= evaluate json.loads('''${problemDetails}''') json
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PUT Subscription - (Method not implemented)
......
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Resource environment/individualVnfIndicator.txt
Library REST ${PRODUCER_SCHEMA}://${PRODUCER_HOST}:${PRODUCER_PORT}
......@@ -15,8 +15,7 @@ GET Individual VNF Indicator
Should Contain ${contentType} application/json
Log Trying to validate response
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json vnfIndicator.schema.json ${json}
Validate Json vnfIndicator.schema.json ${result}
Log Validation OK
GET Individual VNF Indicator - Negative (Not Found)
......@@ -30,8 +29,7 @@ GET Individual VNF Indicator - Negative (Not Found)
Should Contain ${contentType} application/json
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
POST Individual VNF Indicator (Method not implemented)
......
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Resource environment/subscriptions.txt
Library OperatingSystem
Library JSONLibrary
......@@ -17,8 +17,7 @@ GET Subscription
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json VnfIndicatorSubscriptions.schema.json ${json}
Validate Json VnfIndicatorSubscriptions.schema.json ${result}
Log Validated VnfIndicatorSubscription schema
GET Subscription - Filter
......@@ -31,8 +30,7 @@ GET Subscription - Filter
Should Contain ${contentType} application/json
Log Received a 200 OK as expected
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json VnfIndicatorSubscriptions.schema.json ${json}
Validate Json VnfIndicatorSubscriptions.schema.json ${result}
Log Validated VnfIndicatorSubscriptions schema
GET Subscription - Negative Filter
......@@ -46,8 +44,7 @@ GET Subscription - Negative Filter
Should Contain ${contentType} application/json
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
GET Subscription - Negative (Not Found)
......@@ -61,8 +58,7 @@ GET Subscription - Negative (Not Found)
Should Contain ${contentType} application/json
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
POST Subscription
......@@ -78,8 +74,7 @@ POST Subscription
Should Contain ${headers} Location
Log Response has header Location
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json VnfIndicatorSubscription.schema.json ${json}
Validate Json VnfIndicatorSubscription.schema.json ${result}
Log Validation of VnfIndicatorSubscription OK
PUT Subscription - (Method not implemented)
......
*** Settings ***
Documentation This clause defines all the resources and methods provided by the VNF Indicator interface. \
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Library JSONLibrary
Resource environment/vnfIndicators.txt
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
......@@ -20,8 +20,7 @@ GET all Indicators
Should Contain ${contentType} application/json
Log Trying to validate response