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

fix(047): the triggers after the initial csource notification; the @context on PATCH

047_08 to 047_15 consume the initial notification (TS 104-175 clause 12.4.7) before waiting for the one
their trigger sends. 047_08/047_09 register Building and Bus. 047_16 sends its PATCH with the suite's @context:
Update Context Source Registration Subscription takes an optional context (a Link header).
parent aeac6be9
Loading
Loading
Loading
Loading
+5 −1
Changes for TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Test Teardown Delete Created Context Source Registration And Context Sourc


*** Variables ***
${context_source_registration_payload_file_path}=       csourceRegistrations/context-source-registration.jsonld
${context_source_registration_payload_file_path}=       csourceRegistrations/context-source-registration-building-and-bus-entities.jsonld
${subscription_payload_file_path}=                      csourceSubscriptions/subscription.jsonld
${update_fragment_file_path}=                           csourceRegistrations/fragments/context-source-registration-update.json

@@ -46,6 +46,10 @@ Create Initial Context Source Registration and Context Source Registration Subsc
    Check Response Status Code    201    ${create_csr_response.status_code}
    ${create_csrsub_response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    201    ${create_csrsub_response.status_code}
    # TS 104-175 clause 12.4.7: consume the initial csource notification
    # (carrying the already-matching CSR) so the test's wait sees the
    # update-triggered one.
    Wait for notification
    Set Suite Variable    ${context_source_registration_id}
    Set Suite Variable    ${subscription_id}

+5 −1
Changes for TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Suite Teardown Delete Created Context Source Registration And Context Sourc


*** Variables ***
${context_source_registration_payload_file_path}=       csourceRegistrations/context-source-registration.jsonld
${context_source_registration_payload_file_path}=       csourceRegistrations/context-source-registration-building-and-bus-entities.jsonld
${subscription_payload_file_path}=                      csourceSubscriptions/subscription.jsonld
${update_fragment_file_path}=                           csourceRegistrations/fragments/context-source-registration-update-information.json

@@ -46,6 +46,10 @@ Create Initial Context Source Registration And Context Source Registration Subsc
    Check Response Status Code    201    ${create_csr_response.status_code}
    ${create_csrsub_response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    201    ${create_csrsub_response.status_code}
    # TS 104-175 clause 12.4.7: consume the initial csource notification
    # (carrying the already-matching CSR) so the test's wait sees the
    # update-triggered one.
    Wait for notification
    Set Suite Variable    ${context_source_registration_id}
    Set Suite Variable    ${subscription_id}

+4 −0
Changes for TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -43,6 +43,10 @@ Setup Initial Context Source Registration Subscription
    ...    ${subscription_id}
    ${create_csrsub_response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    201    ${create_csrsub_response.status_code}
    # TS 104-175 clause 12.4.7: the initial csource notification is sent
    # unconditionally on subscription — no CSR matches yet, so it carries
    # an empty data array. Consume it so the test's wait sees the right one.
    Wait for notification
    Set Suite Variable    ${subscription_id}

Delete Created Context Source Registration And Subscription
+4 −0
Changes for TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -34,6 +34,10 @@ Receive cSourceNotification For Matching Context Source Registrations On Managem
    ${subscription_payload}=    Load Subscription Sample With Reachable Endpoint    ${filepath}    ${subscription_id}
    ${response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    201    ${response.status_code}
    # TS 104-175 clause 12.4.7: consume the unconditional (empty-data)
    # initial csource notification so the validating wait below sees the
    # CSR-triggered one.
    Wait for notification
    ${context_source_registration_id}=    Generate Random CSR Id
    Set Suite Variable    ${context_source_registration_id}
    ${context_source_registration_payload}=    Load Test Sample
+4 −0
Changes for TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -43,6 +43,10 @@ Setup Initial Context Source Registration Subscription
    ...    ${subscription_id}
    ${create_csrsub_response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    201    ${create_csrsub_response.status_code}
    # TS 104-175 clause 12.4.7: the initial csource notification is sent
    # unconditionally on subscription — no CSR matches yet, so it carries
    # an empty data array. Consume it so the test's wait sees the right one.
    Wait for notification
    Set Suite Variable    ${subscription_id}

Delete Created Context Source Registration And Subscription
Loading