Commit 526015c1 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix(029_08): update to v1.5.1 behaviour for isActive and expiresAt (cannot be null)

parent ccd89389
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
*** Settings ***
Documentation     Check that you can update a subcription: If isActive is equal to true or null and expiresAt is null or corresponds to a DateTime in the future, then status shall be updated to "active"
Documentation     Check that you can update a subcription: If isActive is equal to true and expiresAt corresponds to a DateTime in the future, then status shall be updated to "active"
Resource          ${EXECDIR}/resources/ApiUtils.resource
Resource          ${EXECDIR}/resources/AssertionUtils.resource
Resource          ${EXECDIR}/resources/JsonUtils.resource
@@ -8,22 +8,10 @@ Suite Setup Setup Initial Subscriptions
Suite Teardown    Delete Initial Subscriptions

*** Test Cases ***    SUBSCRIPTION_UPDATE_FRAGMENT_FILE_PATH
ActiveTrueExpiresAtNull
                      subscriptions/fragments/subscription-isActive-expiresAt-null-update-sample.json
                      [Tags]                                                                                  sub-update    5_8_2

ActiveTrueExpiresAt
                      subscriptions/fragments/subscription-isActive-expiresAt-update-sample.json
                      [Tags]                                                                                  sub-update    5_8_2

ActiveNullExpiresAtNull
                      subscriptions/fragments/subscription-isActive-null-expiresAt-null-update-sample.json
                      [Tags]                                                                                  sub-update    5_8_2

ActiveNullExpiresAt
                      subscriptions/fragments/subscription-isActive-null-expiresAt-update-sample.json
                      [Tags]                                                                                  sub-update    5_8_2

*** Variable ***
${subscription_id_prefix}=    urn:ngsi-ld:Subscription:
${subscription_payload_file_path}=    subscriptions/subscription-inactive-sample.jsonld
@@ -31,7 +19,7 @@ ${subscription_payload_file_path}= subscriptions/subscription-inactive-sample
*** Keywords ***
Activate Paused Subscription With isActive And ExpiresAt Members
    [Arguments]    ${subscription_update_fragment_file_path}
    [Documentation]    Check that you can update a subcription: If isActive is equal to true or null and expiresAt is null or corresponds to a DateTime in the future, then status shall be updated to "active"
    [Documentation]    Check that you can update a subcription: If isActive is equal to true and expiresAt corresponds to a DateTime in the future, then status shall be updated to "active"
    Update Subscription    ${subscription_id}    ${subscription_update_fragment_file_path}    ${CONTENT_TYPE_JSON}
    Check Response Status Code Set To    204
    Retrieve Subscription    ${subscription_id}
+1 −8
Original line number Diff line number Diff line
{
   "type":"Subscription",
   "expiresAt": "2020-08-01T22:07:00Z",
   "notification":{
      "format":"keyValues",
      "endpoint":{
         "uri":"http://my.endpoint.org/notify",
         "accept":"application/json"
      }
   }
   "expiresAt": "2020-08-01T22:07:00Z"
}
 No newline at end of file
+0 −12
Original line number Diff line number Diff line
{
   "type":"Subscription",
   "isActive": true,
   "expiresAt": null,
   "notification":{
      "format":"keyValues",
      "endpoint":{
         "uri":"http://my.endpoint.org/notify",
         "accept":"application/json"
      }
   }
}
 No newline at end of file
+1 −8
Original line number Diff line number Diff line
{
   "type":"Subscription",
   "isActive": true,
   "expiresAt": "2030-08-01T22:07:00Z",
   "notification":{
      "format":"keyValues",
      "endpoint":{
         "uri":"http://my.endpoint.org/notify",
         "accept":"application/json"
      }
   }
   "expiresAt": "2030-08-01T22:07:00Z"
}
 No newline at end of file
+0 −12
Original line number Diff line number Diff line
{
   "type":"Subscription",
   "isActive": null,
   "expiresAt": null,
   "notification":{
      "format":"keyValues",
      "endpoint":{
         "uri":"http://my.endpoint.org/notify",
         "accept":"application/json"
      }
   }
}
 No newline at end of file
Loading