Commit f1670694 authored by Houcem Kacem's avatar Houcem Kacem
Browse files

Merge branch 'fix/review-subscription-tcs' into 'develop'

fix: fix unknown subscription id

See merge request !57
parents 8c0ea6a3 d6631f19
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ Delete Unknown Subscription
    [Documentation]  Check that you cannot delete a subscription: If the subscription id provided does not correspond to any existing subscription in the system then an error of type ResourceNotFound shall be raised
    [Tags]  mandatory

    Delete Subscription   unknownSubscription
    Delete Subscription   urn:ngsi-ld:Subscription:unknowSubscription

    Check Response Status Code Set To  404
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_RESOURCE_NOT_FOUND}
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ Retrieve Unknown Subscription
    [Documentation]  Check that you cannot retrieve a subscription: If the identifier provided does not correspond to any existing subscription in the system then an error of type ResourceNotFound shall be raised
    [Tags]  mandatory

    Retrieve Subscription   unknownSubscription
    Retrieve Subscription   urn:ngsi-ld:Subscription:unknowSubscription

    Check Response Status Code Set To  404
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_RESOURCE_NOT_FOUND}
+2 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ Suite Teardown Delete Initial Subscriptions
*** Variable ***
${subscription_id_prefix}=  urn:ngsi-ld:Subscription:
${subscription_payload_file_path}=   subscriptions/subscription-sample.jsonld
${expectation_file_path}=   subscriptions/expectations/subscriptions-030-03-expectation.json

*** Test Case ***
Retrieve Subscription
@@ -19,7 +20,7 @@ Retrieve Subscription
    Retrieve Subscription   ${subscription_id}     context=${ngsild_test_suite_context}

    Check Response Status Code Set To  200
    Check Response Body Containing Subscription element     ${subscription_payload_file_path}   ${subscription_id}
    Check Response Body Containing Subscription element     ${expectation_file_path}   ${subscription_id}

*** Keywords ***
Setup Initial Subscriptions
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ Update Unknown Subscription
    [Documentation]  Check that you cannot update a subscription: If the NGSI-LD System does not know about the target Subscription, because there is no existing Subscription whose id (URI) is equivalent, an error of type ResourceNotFound shall be raised
    [Tags]  mandatory

    Update Subscription   unknownSubscription     ${subscription_update_fragment_file_path}   ${CONTENT_TYPE_JSON}
    Update Subscription   urn:ngsi-ld:Subscription:unknowSubscription     ${subscription_update_fragment_file_path}   ${CONTENT_TYPE_JSON}

    Check Response Status Code Set To  404
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_RESOURCE_NOT_FOUND}
+2 −2
Original line number Diff line number Diff line
@@ -11,8 +11,8 @@ Suite Teardown Delete Initial Subscriptions
${subscription_id_prefix}=  urn:ngsi-ld:Subscription:
${subscription_payload_file_path}=   subscriptions/subscription-sample.jsonld
${subscription_update_fragment_file_path}=   subscriptions/fragments/subscription-vehicle-entities-sample.json
${expected_subscription_payload_file_path}=   subscriptions/expected/subscription-vehicle-sample.jsonld
${expected_expanded_subscription_payload_file_path}=   subscriptions/expected/subscription-vehicle-expanded-types-sample.jsonld
${expected_subscription_payload_file_path}=   subscriptions/expectations/subscription-vehicle-sample.jsonld
${expected_expanded_subscription_payload_file_path}=   subscriptions/expectations/subscription-vehicle-expanded-types-sample.jsonld

*** Test Case ***
Update Subscription With Term to Uri Expansion
Loading