Commit 60a77f4f authored by Benedetta Arena's avatar Benedetta Arena
Browse files

fix: improve logic of MergeEntity

parent e9a7182f
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -34,9 +34,6 @@ D008_01_exc Merge Entity On Both Context Broker And Context Source
    ${stub_count}=    Get Stub Count    PATCH    /broker1/ngsi-ld/v1/entities/${entity_id}
    Should Be True    ${stub_count} > 0

    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}    local=true
    Should Not Contain    ${response}    speed

*** Keywords ***
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
    ${entity_id}=    Generate Random Vehicle Entity Id
+3 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ D008_01_inc Merge Entity On Both Context Broker And Context Source
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_04    additive-inclusive    4_3_6_2    5_6_17

    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}
    Check Response Status Code    200    ${response.status_code}
    ${old_isparked}=    Get From Dictionary    ${response.json()}    isParked2
    ${old_brandname}=    Get From Dictionary    ${response.json()}    brandName

@@ -43,7 +44,7 @@ D008_01_inc Merge Entity On Both Context Broker And Context Source
    ${new_isparked}=    Get From Dictionary    ${response.json()}    isParked2
    Should Be Equal    ${old_brandname}    ${new_brandname}
    Should Not Be Equal    ${old_isparked}    ${new_isparked}
    Dictionary Should Contain Key    ${response.json()}    speed
    Should Contain    ${response.json()}    speed

*** Keywords ***
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
+1 −2
Original line number Diff line number Diff line
@@ -7,8 +7,7 @@
        "source": {
            "type": "Property",
            "value": "Speedometer"
        },
        "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed2" 
        }
    },
    "isParked2": {
        "type": "Relationship",