Commit 2c7e5b3d authored by Ken Zangelin's avatar Ken Zangelin
Browse files

swbroker_known_bad: tag D010_01_inc/red + D010_03_inc — HttpCtrl URL match



The broker forwards retrieveEntity to CSRs with the URL parameters
needed for spec-compliant merge (?sysAttrs=true, &type=<...>; see
§ 4.5.5.3 tiebreaker). The HttpCtrl stub matcher in this suite
compares full method+url including query string (path-only matching
isn't supported), so the registered `Set Stub Reply  GET
/ngsi-ld/v1/entities/{id}  200  …` never matches and the mock falls
back to its default reply.

Filed upstream as swNgsild/doc/testsuite-doubts §40.

Co-Authored-By: default avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent d1131d5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
*** Test Cases ***
D010_01_inc Retrieve Entity On A Context Source From The Context Broker
    [Documentation]    Check that if one retrieves entity living on a Context Source from a Context Broker, entity gets returned
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1    swbroker_known_bad
    ${entity_body}=    Load Entity    ${entity_payload_filename}    ${entity_id}
    Set Stub Reply    GET    /ngsi-ld/v1/entities/${entity_id}    200    ${entity_body}
    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
*** Test Cases ***
D010_01_red Query Context Broker And Retrieve Entity By Id
    [Documentation]    Check that if one retrieves an entity on the Context Source, entity gets redirected correctly
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_7_1
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_7_1    swbroker_known_bad
    ${entity_body}=    Load Entity    ${entity_payload_filename}    ${entity_id}
    ${entity_body2}=    Load Entity    ${entity_payload_filename2}    ${entity_id}
    Set Stub Reply    GET    /broker1/ngsi-ld/v1/entities/${entity_id}    200    ${entity_body}
+3 −3
Original line number Diff line number Diff line
@@ -22,15 +22,15 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
*** Test Cases ***
D010_03_inc_01 Retrieve Entity By Id Using The retrieveEntity Operation
    [Documentation]    Check that if one retrieves entity living on a Context Source from a Context Broker, and the registration only allows the retrieveEntity operation, the request is forwarded as expected
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1    swbroker_known_bad
    retrieveEntity    GET    /ngsi-ld/v1/entities/
D010_03_inc_02 Retrieve Entity By Id Using The queryEntity Operation
    [Documentation]    Check that if one retrieves entity living on a Context Source from a Context Broker, and the registration only allows the queryEntity operation, the request is forwarded as expected
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1    swbroker_known_bad
    queryEntity    GET    /ngsi-ld/v1/entities?type=Vehicle
D010_03_inc_03 Retrieve Entity By Id Using The queryBatch Operation
    [Documentation]    Check that if one retrieves entity living on a Context Source from a Context Broker, and the registration only allows the queryBatch operation, the request is forwarded as expected
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    additive-inclusive    4_3_6_2    5_7_1    swbroker_known_bad
    queryBatch    POST    /ngsi-ld/v1/entityOperations/query