Commit a523f85b authored by kzangeli's avatar kzangeli
Browse files

fix(distops): `Should Be Equal As Integers` for stub-count assertions

HttpCtrl's `Get Stub Count` returns a Python int; the literal `1` in
the .robot file is a string. Robot's `Should Be Equal` is type-strict
and fails with `1 (integer) != 1 (string)` — covered by doubt #23,
hit by ~12 DistOps tests.

Sweep across `TP/NGSI-LD/DistributedOperations/`: 35 occurrences of
`Should Be Equal ${stub_count} N` → `Should Be Equal As Integers
${stub_count} N` (sed; 25 robot files touched, one-line edits).

Doubt #23 marked RESOLVED. Sibling assertions using `Should Be True
${stub_count} > 0` are already int-vs-int (Python expression on int),
no change needed.

Verified: D012_01_inc (which had only this blocker) now passes; tests
like D003_01_red / D016_01_inc proceed past the stub-count assertion
and fail on separate downstream issues out of scope here.
parent 1bf56638
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