Commit 64f5c996 authored by M. Rehan Abbasi's avatar M. Rehan Abbasi Committed by Giacomo Bernini
Browse files

add POST unprocessable entity test case for subscriptions

parent b42b8069
Loading
Loading
Loading
Loading
+16 −3
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ GET Subscriptions - invalid resource endpoint
    Get all Subscriptions
    Get all Subscriptions
    Check HTTP Response Status Code Is    404
    Check HTTP Response Status Code Is    404
    
    
Create new Subscription
POST Create new Subscription
    [Documentation]    Test ID: 8.3.1.10.7
    [Documentation]    Test ID: 8.3.1.10.7
    ...    Test title: Create new Subscription
    ...    Test title: Create new Subscription
    ...    Test objective: The objective is to test the creation of a new subscription and perform a JSON schema and content validation of the returned subscription data structure
    ...    Test objective: The objective is to test the creation of a new subscription and perform a JSON schema and content validation of the returned subscription data structure
@@ -105,7 +105,7 @@ Create new Subscription
    Check Postcondition Subscription Is Set 
    Check Postcondition Subscription Is Set 




Create request for duplicated Subscription not creating duplicated subscriptions
POST Create request for duplicated Subscription not creating duplicated subscriptions
    [Tags]    no-duplicated-subs
    [Tags]    no-duplicated-subs
    [Documentation]    Test ID: 8.3.1.10.8
    [Documentation]    Test ID: 8.3.1.10.8
    ...    Test title: Create request for duplicated Subscription not creating duplicated subscriptions
    ...    Test title: Create request for duplicated Subscription not creating duplicated subscriptions
@@ -121,7 +121,7 @@ Create request for duplicated Subscription not creating duplicated subscriptions
    Check HTTP Response Header Contains    Location
    Check HTTP Response Header Contains    Location
    Check Postcondition Subscription Resource Returned in Location Header Is Available
    Check Postcondition Subscription Resource Returned in Location Header Is Available


Create request for duplicated Subscription creating duplicated subscriptions
POST Create request for duplicated Subscription creating duplicated subscriptions
    [Tags]    duplicated-subs
    [Tags]    duplicated-subs
    [Documentation]    Test ID: 8.3.1.10.9
    [Documentation]    Test ID: 8.3.1.10.9
    ...    Test title: Create request for duplicated Subscription creating duplicated subscriptions
    ...    Test title: Create request for duplicated Subscription creating duplicated subscriptions
@@ -172,3 +172,16 @@ DELETE Subscriptions - Method not implemented
    ...    Post-Conditions: none   
    ...    Post-Conditions: none   
    Send Delete Request for Subscriptions
    Send Delete Request for Subscriptions
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405

POST Create a new subscription - Unprocessable Entity
    [Documentation]    Test ID: 8.3.1.10.13
    ...    Test title: POST Create a new Subscription - Unprocessable Entity
    ...    Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed.
    ...    Pre-conditions: none
    ...    Reference: clause 5.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    Send Post Request for Subscription
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is  ProblemDetails
+29 −1
Original line number Original line Diff line number Diff line
{  "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",  "type": "object",  "required": [    "status",    "detail"  ],  "properties": {    "type": {      "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",      "type": "string",      "format": "URI"    },    "title": {      "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type.  It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",      "type": "string"    },    "status": {      "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",      "type": "integer"    },    "detail": {      "description": "A human-readable explanation specific to this occurrence of the problem.\n",      "type": "string"    },    "instance": {      "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",      "type": "string",      "format": "URI"    }  }}
{
 No newline at end of file
  "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
  "type": "object",
  "required": ["status", "detail"],
  "properties": {
    "type": {
      "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
      "type": "string",
      "format": "URI"
    },
    "title": {
      "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type.  It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
      "type": "string"
    },
    "status": {
      "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
      "type": "integer"
    },
    "detail": {
      "description": "A human-readable explanation specific to this occurrence of the problem.\n",
      "type": "string"
    },
    "instance": {
      "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
      "type": "string",
      "format": "URI"
    }
  }
}