Commit 8c753aac authored by Elian Kraja's avatar Elian Kraja
Browse files

Fixing SOL003 bugs on schemas

parent 6c192272
Loading
Loading
Loading
Loading
+84 −84
Original line number Original line Diff line number Diff line
@@ -28,7 +28,7 @@ Get information about multiple alarms
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    alarm.schema.json    ${json}
    Validate Json    Alarms.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


Get information about multiple alarms with filters 
Get information about multiple alarms with filters 
@@ -43,7 +43,7 @@ Get information about multiple alarms with filters
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    alarm.schema.json    ${json}
    Validate Json    Alarms.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters
Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters
+115 −115
Original line number Original line Diff line number Diff line
@@ -36,7 +36,7 @@ Get information about an alarm
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    alarm.schema.json    ${json}
    Validate Json    Alarm.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


PUT Alarm - Method not implemented
PUT Alarm - Method not implemented
@@ -63,14 +63,14 @@ PATCH Alarm
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    alarmModifications.schema.json    ${json}
    Validate Json    AlarmModification.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


PATCH Alarm - Conflict
PATCH Alarm - Conflict
    [Documentation]    Conflict
    [Documentation]    Conflict
    ...    The operation cannot be executed currently, due to a conflict with the state of the Individual alarm resource. 
    ...    The operation cannot be executed currently, due to a conflict with the state of the �Individual alarm� resource. 
    ...    Typically, this is due to the fact that the alarm is already in the state that is requested to be set (such as trying to acknowledge an already-acknowledged alarm). 
    ...    Typically, this is due to the fact that the alarm is already in the state that is requested to be set (such as trying to acknowledge an already-acknowledged alarm). 
    ...    The response body shall contain a ProblemDetails structure, in which the detail attribute should convey more information about the error.
    ...    The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
    Depends On Test    PATCH Alarm    # If the previous test scceeded, it means that the alarm is in ackownledged state
    Depends On Test    PATCH Alarm    # If the previous test scceeded, it means that the alarm is in ackownledged state
    log    Trying to perform a PATCH. This method modifies an individual alarm resource
    log    Trying to perform a PATCH. This method modifies an individual alarm resource
    Set Headers  {"Accept":"${ACCEPT}"} 
    Set Headers  {"Accept":"${ACCEPT}"} 
@@ -89,7 +89,7 @@ PATCH Alarm - Precondition failed
    [Documentation]    Precondition Failed
    [Documentation]    Precondition Failed
    ...    A precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, 
    ...    A precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, 
    ...    indicating that the resource was modified by another entity. The response body should contain a ProblemDetails structure, 
    ...    indicating that the resource was modified by another entity. The response body should contain a ProblemDetails structure, 
    ...    in which the detail attribute should convey more information about the error.
    ...    in which the �detail� attribute should convey more information about the error.
    Depends On Test    PATCH Alarm    # If the previous test scceeded, it means that Etag has been modified
    Depends On Test    PATCH Alarm    # If the previous test scceeded, it means that Etag has been modified
    log    Trying to perform a PATCH. This method modifies an individual alarm resource
    log    Trying to perform a PATCH. This method modifies an individual alarm resource
    Set Headers  {"Accept":"${ACCEPT}"} 
    Set Headers  {"Accept":"${ACCEPT}"} 
+68 −68
Original line number Original line Diff line number Diff line
@@ -29,7 +29,7 @@ Get Information about an individual subscription
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    subscriptions.schema.json    ${json}
    Validate Json    FmSubscription.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


PUT an individual subscription - Method not implemented
PUT an individual subscription - Method not implemented
+121 −121
Original line number Original line Diff line number Diff line
@@ -22,7 +22,7 @@ Create a new subscription
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    subscriptions.schema.json    ${json}
    Validate Json    FmSubscription.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


Create a new Subscription - DUPLICATION
Create a new Subscription - DUPLICATION
@@ -39,7 +39,7 @@ Create a new Subscription - DUPLICATION
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    Should Contain    ${contentType}    ${CONTENT_TYPE}
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    subscriptions.schema.json    ${json}
    Validate Json    FmSubscriptions.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


Create a new Subscription - NO-DUPLICATION
Create a new Subscription - NO-DUPLICATION
@@ -67,7 +67,7 @@ GET Subscriptions
    Integer    response status    200
    Integer    response status    200
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    subscriptions.schema.json    ${json}
    Validate Json    FmSubscriptions.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK


GET Subscription - Filter
GET Subscription - Filter
@@ -79,7 +79,7 @@ GET Subscription - Filter
    Log    Received a 200 OK as expected
    Log    Received a 200 OK as expected
    ${result}=    Output    response body
    ${result}=    Output    response body
    ${json}=    evaluate    json.loads('''${result}''')    json
    ${json}=    evaluate    json.loads('''${result}''')    json
    Validate Json    subscriptions.schema.json    ${json}
    Validate Json    FmSubscriptions.schema.json    ${json}
    Log    Validation OK
    Log    Validation OK
    
    
GET subscriptions - Bad Request Invalid attribute-based filtering parameters
GET subscriptions - Bad Request Invalid attribute-based filtering parameters
+18 −0
Original line number Original line Diff line number Diff line
{
  "AlarmModifications": {
    "description": "This type represents attribute modifications for an \"Individual alarm\" resource, i.e. modifications to a resource representation based on the \"Alarm\" data type. The attributes of \"Alarm\" that can be modified are included in the \"AlarmModifications\" data type.\n",
    "type": "object",
    "required": [
      "ackState"
    ],
    "properties": {
      "ackState": {
        "description": "New value of the \"ackState\" attribute in \"Alarm\". Permitted values: * ACKNOWLEDGED\n",
        "type": "string",
        "enum": [
          "ACKNOWLEDGED"
        ]
      }
    }
  }
}
Loading