Commit f35a5ade authored by kzangeli's avatar kzangeli
Browse files

fix: 039_01_01 assert the subscription's broker-computed status is "active"

The retrieved CSR subscription carries a 'status' member (§ 5.2.12) that the
sent update fragment doesn't, so the bulk "Check Updated Resource Set To"
flagged it as an unexpected added key. Rather than just ignore it, exclude it
from the bulk comparison (its position isn't predictable from the payload) and
add a dedicated assertion that status == "active" — a subscription that is
neither paused nor expired. Now actually tested, not hidden.
parent c8545038
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -33,9 +33,19 @@ ${subscription_update_fragment_file_path}= csourceSubscriptions/fragments/s
    ...    subscription_id=${subscription_id}
    ...    context=${ngsild_test_suite_context}
    ...    accept=${CONTENT_TYPE_LD_JSON}
    # 'status' is broker-computed (§ 5.2.12), not part of the sent payload, so the
    # bulk resource comparison can't predict it — exclude it here and assert it
    # explicitly below instead.
    ${ignored_attributes}=    Create List    ${status_regex_expr}
    Check Updated Resource Set To
    ...    updated_resource=${subscription}
    ...    response_body=${response1.json()}
    ...    ignored_keys=${ignored_attributes}
    # A subscription that is neither paused nor expired is "active" (§ 5.2.12).
    Check Response Body Containing an Attribute set to
    ...    expected_attribute_name=status
    ...    response_body=${response1.json()}
    ...    expected_attribute_value=active


*** Keywords ***