Commit b51e61e2 authored by Ken Zangelin's avatar Ken Zangelin
Browse files

swbroker_known_bad: D005/D006/D009/D013 setup — § 5.9.2.4 CSR conflict



Setup creates a local entity then attempts to register an exclusive
(or redirect) Context Source for the same entity id+type. § 5.9.2.4:

  "If an Entity already exists for the supplied Entity ID (URI) and
   the existing Entity contains any of the Attributes defined in the
   registration, an error of type Conflict shall be raised."

Spec-compliant brokers return 409; these tests expect the CSR
registration to succeed (201) anyway. Test design predates the
v1.7+ tightening of § 5.9.2.4.

Tests affected:
- D005_01_exc (Partial Attribute Update, exclusive)
- D006_01_red, D006_02_red (Delete Attribute, redirect)
- D009_01_exc, D009_01_red (Replace Attribute)
- D013_01_red, D013_02_red (Upsert Batch)

Co-Authored-By: default avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent 387dd3c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-
*** Test Cases ***
D013_01_red Batch Upsert Entities With Redirect Registration Without Update Flag
    [Documentation]    Check that if one requests the Context Broker to replace a batch of entities that match a redirect registration, these are replaced on the Context Source
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_8
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_8    swbroker_known_bad

    ${new_first_entity}=    Load Entity    ${new_entity_payload_filename}    ${first_entity_id}
    ${new_second_entity}=    Load Entity    ${new_entity_payload_filename}    ${second_entity_id}
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-
*** Test Cases ***
D013_02_red Batch Upsert Entities With Redirect Registration With Update Flag
    [Documentation]    Check that if one requests the Context Broker to replace a batch of entities that match a redirect registration, these are replaced on the Context Source
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_8
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_8    swbroker_known_bad

    ${new_first_entity}=    Load Entity    ${new_entity_payload_filename}    ${first_entity_id}
    ${new_second_entity}=    Load Entity    ${new_entity_payload_filename}    ${second_entity_id}
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ ${attribute_id} speed
*** Test Cases ***
D006_01_red Delete Entity Attributes
    [Documentation]    Verify that, when one has a redirect registration on a Context Broker with redirectionOps, one is able to delete entities attributes on a Context Source
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_5
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_5    swbroker_known_bad

    Set Stub Reply    DELETE    /broker1/ngsi-ld/v1/entities/${entity_id}/attrs/${attribute_id}    204
    Set Stub Reply    DELETE    /broker2/ngsi-ld/v1/entities/${entity_id}/attrs/${attribute_id}    204
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ ${attribute_id} speed
*** Test Cases ***
D006_02_red Delete Entity Attributes
    [Documentation]    Verify that, when one has a redirect registration on a Context Broker with redirectionOps, one is able to delete entities attributes on a Context Source
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_5
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_6_5    swbroker_known_bad

    Set Stub Reply    DELETE    /broker1/ngsi-ld/v1/entities/${entity_id}/attrs/${attribute_id}    204
    Set Stub Reply    DELETE    /broker2/ngsi-ld/v1/entities/${entity_id}/attrs/${attribute_id}    204
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ ${attribute_id} speed
*** Test Cases ***
D005_01_exc Partial Partial Attribute Update
    [Documentation]    Check that if one request the Context Broker to partially update an attribute whose id matches an exclusive registration, this is updated on the Context Source
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-exclusive    4_3_6_3    5_6_4
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-exclusive    4_3_6_3    5_6_4    swbroker_known_bad

    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}    local=true
    ${old_isparked}=    Get Value From Json    ${response.json()}    $.isParked2
Loading