Commit 5a5aba54 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch 'master' into 'master'

Master

See merge request !3
parents 2ec0d30a d8da033d
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
*** Settings ***
Resource    environment/variables.txt 
Library    REST    ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
...        spec=SOL002-VNFConfiguration-API.yaml
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    OperatingSystem
@@ -124,8 +123,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
+6 −2
Original line number Diff line number Diff line
*** Variables ***

${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==
@@ -9,8 +15,6 @@ ${CONTENT_TYPE} application/json
${apiRoot}        /
${apiName}        vnfconfig
${apiVersion}     v1
${Etag}=    an etag
${Etag_modified}=    a modified etag
${WRONG_AUTHORIZATION}    Bearer    XXXXXWRONGXXXXX
${alarm_filter}       managedObjectId
${managedObjectId}    007c111c-38a1-42c0-a666-7475ecb1567c
+3 −7
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
*** 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 ***
+4 −9
Original line number Diff line number Diff line
@@ -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/
@@ -39,8 +38,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
@@ -72,8 +70,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
@@ -95,8 +92,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
@@ -119,8 +115,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
Loading