Commit 1f48263c authored by Mudassar Khan's avatar Mudassar Khan Committed by Giacomo Bernini
Browse files

add test case to check response of initantiate VNF Task without autorization

parent 8f143117
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Instantiate a vnfInstance
    ...    Test title: Post Instantiate Individual VNFInstance 
    ...    Test objective: The objective is to instantiate a VNF instance
    ...    Pre-conditions: VNF instance resource is in NOT INSTANTIATED state
    ...    Reference: Clause 5.4.4.4.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -27,7 +27,7 @@ Instantiate a vnfInstance Conflict
    ...    Test title: Post Instantiate Individual VNFInstance 
    ...    Test objective: The objective is to verify that the instantiation of the vnf cannot be executed currently, due to a conflict with the state of the VNF instance resource. 
    ...    Pre-conditions: VNF instance resource is in INSTANTIATED state
    ...    Reference: Clause 5.4.4.4.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -88,7 +88,7 @@ Instantiate a vnfInstance with permitted authorization scope
    ...    Test title: Post Instantiate Individual VNFInstance with permitted authorization scope
    ...    Test objective: The objective is to instantiate a VNF instance with permitted authorization scope
    ...    Pre-conditions: VNF instance resource is in NOT INSTANTIATED state
    ...    Reference: Clause 5.4.4.4.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -102,10 +102,22 @@ Instantiate a vnfInstance with not permitted authorization scope
    ...    Test title: Post Instantiate Individual VNFInstance with not permitted authorization scope
    ...    Test objective: The objective is to instantiate a VNF instance with not permitted authorization scope
    ...    Pre-conditions: VNF instance resource is in NOT INSTANTIATED state
    ...    Reference: Clause 5.4.4.4.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    POST instantiate individual vnfInstance with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is    ProblemDetails
Instantiate a vnfInstance - Unauthorized
    [Documentation]    Test ID: 7.3.1.3.9
    ...    Test title: Post Instantiate Individual VNFInstance - Unauthorized 
    ...    Test objective: The objective is to instantiate a VNF instance without authorization
    ...    Pre-conditions: VNF instance resource is in NOT INSTANTIATED state
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    POST instantiate individual vnfInstance - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails
 No newline at end of file
+9 −1
Original line number Diff line number Diff line
@@ -2804,3 +2804,11 @@ JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded}
POST instantiate individual vnfInstance - Unauthorized
    Log    Trying to Instantiate a vnf Instance witout authorization
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    ${body}=    Get File    jsons/instantiateVnfRequest.json
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
 No newline at end of file