Commit 71150fd8 authored by kzangeli's avatar kzangeli
Browse files

fix: stub-count check must be type-aware (Should Be Equal As Integers)



`Get Stub Count` returns a Python int. The 25 distop tests that
checked it with bare `Should Be Equal` compared the int against a
string literal — Robot 7.x is type-strict, so even a value-equal
`1 (integer) != 1 (string)` fails the assertion. Same edit in every
file: `Should Be Equal` → `Should Be Equal As Integers`.

Affected (alphabetical):

- D003_01_{exc,inc,red}
- D003_02_{exc,inc,red}
- D004_01_red
- D007_01_{exc,red}
- D009_01_{exc,red}
- D012_01_{exc,inc,red}
- D013_01_{exc,inc,red}, D013_02_{exc,red}
- D014_01_{exc,red}, D014_02_{exc,red}
- D015_01_{exc,inc,red}
- D016_01_{exc,inc,red}

Verified: at least one (D003_01_inc) now PASS end-to-end after this
fix combined with the HttpCtrl trailing-slash fix in !284. Others
expose unrelated downstream issues that the failed assertion was
masking.

Co-Authored-By: default avatarClaude Opus 4.7 <noreply@anthropic.com>
parent 8dce35ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ D012_01_exc Batch Create Entities With Exclusive Registration
    Check Response Status Code    201    ${response.status_code}

    ${stub_count}=    Get Stub Count    POST    /broker1/ngsi-ld/v1/entityOperations/create
    Should Be Equal    ${stub_count}    1
    Should Be Equal As Integers    ${stub_count}    1


*** Keywords ***
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ D012_01_inc Batch Create Entities With Inclusive Registration
    Check Response Status Code    201    ${response.status_code}

    ${stub_count}=    Get Stub Count    POST    /ngsi-ld/v1/entityOperations/create
    Should Be Equal    ${stub_count}    1
    Should Be Equal As Integers    ${stub_count}    1

    @{ignore_keys}=    Create List    @context    speed
    ${entities_to_be_queried}=    Catenate    SEPARATOR=,    ${first_entity_id}    ${second_entity_id}
+2 −2
Original line number Diff line number Diff line
@@ -37,9 +37,9 @@ D012_01_red Batch Create Entities With Redirect Registration
    Check Response Status Code    201    ${response.status_code}

    ${stub_count}=    Get Stub Count    POST    /broker1/ngsi-ld/v1/entityOperations/create
    Should Be Equal    ${stub_count}    1
    Should Be Equal As Integers    ${stub_count}    1
    ${stub_count}=    Get Stub Count    POST    /broker2/ngsi-ld/v1/entityOperations/create
    Should Be Equal    ${stub_count}    1
    Should Be Equal As Integers    ${stub_count}    1

*** Keywords ***
Setup Entity Id And Registration And Start Context Source Mock Server
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ D015_01_exc Delete Batch Of Entities On Both Context Broker And Context Source
    Check Response Body Is Empty    ${response}

    ${stub_count}=    Get Stub Count    POST    /broker1/ngsi-ld/v1/entityOperations/delete
    Should Be Equal    ${stub_count}    1
    Should Be Equal As Integers    ${stub_count}    1

    ${expected_entities_ids}=    Catenate    SEPARATOR=,    @{entities_ids_to_be_deleted}
    ${response}=    Query Entities
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ D015_01_inc Delete Batch Of Entities On Both Context Broker And Context Source
    Check Response Body Is Empty    ${response}

    ${stub_count}=    Get Stub Count    POST    /ngsi-ld/v1/entityOperations/delete
    Should Be Equal    ${stub_count}    1
    Should Be Equal As Integers    ${stub_count}    1

    ${expected_entities_ids}=    Catenate    SEPARATOR=,    @{entities_ids_to_be_deleted}
    ${response}=    Query Entities
Loading