Commit dd273fac authored by Andrea Il Grande's avatar Andrea Il Grande
Browse files

Removed unnecessary check after entity creation

parent 7512aba8
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration, this is created on the Context Repository too 
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration, this is created on the Context Repository too 
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}


    @{entities_id}=    Create List    ${entity_id}
    @{entities_id}=    Create List    ${entity_id}
    ${response}=    Query Entities    entity_types=Vehicle    local=true    context=${ngsild_test_suite_context}
    ${response}=    Query Entities    entity_types=Vehicle    local=true    context=${ngsild_test_suite_context}
+0 −2
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration and already exists locally, this raises an error on the Context Producer but is created correctly on the Context Repository
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration and already exists locally, this raises an error on the Context Producer but is created correctly on the Context Repository
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    Check Response Status Code    207    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}
    
    
    Check JSON Value In Response Body    ['status']    409    ${response.json()['errors'][0]['error']}
    Check JSON Value In Response Body    ['status']    409    ${response.json()['errors'][0]['error']}


@@ -39,7 +38,6 @@ Setup Entity On Remote And Registration
    Set Suite Variable    ${entity_id}
    Set Suite Variable    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}


    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    Set Suite Variable    ${registration_id}
+0 −3
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
    [Documentation]    Check that if one requests the Context Consumer to create an entity that matches an inclusive registration and already exists both locally and remotely, this raises an error on both Context Producer and Context Repository
    [Documentation]    Check that if one requests the Context Consumer to create an entity that matches an inclusive registration and already exists both locally and remotely, this raises an error on both Context Producer and Context Repository
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    Check Response Status Code    207    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}
    
    
    ${length}=    Get Length    ${response.json()['errors']}
    ${length}=    Get Length    ${response.json()['errors']}
    Should Be Equal As Integers    ${length}    2
    Should Be Equal As Integers    ${length}    2
@@ -36,10 +35,8 @@ Setup Entity On Remote And Registration
    Set Suite Variable    ${entity_id}
    Set Suite Variable    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    url_type=${remote_url}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    url_type=${remote_url}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}




    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
+0 −2
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration and already exists remotely, this raises an error on the Context Repository, but it works just fine on the Context Producer
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration and already exists remotely, this raises an error on the Context Repository, but it works just fine on the Context Producer
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    Check Response Status Code    207    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}
    
    
    Check JSON Value In Response Body    ['status']    409    ${response.json()['errors'][0]['error']}
    Check JSON Value In Response Body    ['status']    409    ${response.json()['errors'][0]['error']}


@@ -38,7 +37,6 @@ Setup Entity On Remote And Registration
    Set Suite Variable    ${entity_id}
    Set Suite Variable    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    url_type=${remote_url}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    url_type=${remote_url}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}




    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
+0 −1
Original line number Original line Diff line number Diff line
@@ -34,7 +34,6 @@ Setup Entity On Remote And Registration
    Set Suite Variable    ${entity_id}
    Set Suite Variable    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    url_type=${remote_url}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    url_type=${remote_url}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${response.status_code}
    Check Response Headers Containing URI set to    ${entity_id}    ${response.headers}


    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    Set Suite Variable    ${registration_id}
Loading