Loading TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +6 −5 Original line number Original line Diff line number Diff line Loading @@ -34,12 +34,11 @@ Update Context Source ... ${registration_update_fragment} ... ${registration_update_fragment} ... ${CONTENT_TYPE_LD_JSON} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response.status_code} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Context Source Registration Check Retrieving Context Source Registration ... context_source_registration_id=${registration_id} ... registration_id=${registration_id} ... context=${ngsild_test_suite_context} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} @context ... registration_payload=${registration_payload} Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} Delete Updated Context Source Registration Delete Updated Context Source Registration Delete Context Source Registration ${registration_id} Delete Context Source Registration ${registration_id} Loading @@ -47,7 +46,9 @@ Delete Updated Context Source Registration Initialize the Test Case Initialize the Test Case ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${registration_id}= Generate Random Entity Id ${registration_id_prefix} Set Test Variable ${registration_id} Set Test Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} # ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${payload}= Load JSON From File ... ${EXECDIR}/data/csourceRegistrations/context-source-registration-sample.jsonld ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} Set Global Variable ${registration_payload} Set Global Variable ${registration_payload} ${response}= Create Context Source Registration With Return ${registration_payload} ${response}= Create Context Source Registration With Return ${registration_payload} Loading resources/AssertionUtils.resource +10 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ Library RequestsLibrary Library Collections Library Collections Library JSONLibrary Library JSONLibrary Library String Library String Resource ${EXECDIR}/resources/ApiUtils.resource *** Variables *** *** Variables *** Loading Loading @@ -399,3 +400,12 @@ Check SUT Not Containing Resource Check SUT Not Containing Resources Check SUT Not Containing Resources [Arguments] ${response_body} [Arguments] ${response_body} Should Be Empty ${response_body} Should Be Empty ${response_body} Check Retrieving Context Source Registration [Arguments] ${registration_id} ${context} ${accept} ${registration_payload} ${response}= Retrieve Context Source Registration ... context_source_registration_id=${registration_id} ... context=${context} ... accept=${accept} ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} Loading
TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +6 −5 Original line number Original line Diff line number Diff line Loading @@ -34,12 +34,11 @@ Update Context Source ... ${registration_update_fragment} ... ${registration_update_fragment} ... ${CONTENT_TYPE_LD_JSON} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response.status_code} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Context Source Registration Check Retrieving Context Source Registration ... context_source_registration_id=${registration_id} ... registration_id=${registration_id} ... context=${ngsild_test_suite_context} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} @context ... registration_payload=${registration_payload} Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} Delete Updated Context Source Registration Delete Updated Context Source Registration Delete Context Source Registration ${registration_id} Delete Context Source Registration ${registration_id} Loading @@ -47,7 +46,9 @@ Delete Updated Context Source Registration Initialize the Test Case Initialize the Test Case ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${registration_id}= Generate Random Entity Id ${registration_id_prefix} Set Test Variable ${registration_id} Set Test Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} # ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${payload}= Load JSON From File ... ${EXECDIR}/data/csourceRegistrations/context-source-registration-sample.jsonld ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} Set Global Variable ${registration_payload} Set Global Variable ${registration_payload} ${response}= Create Context Source Registration With Return ${registration_payload} ${response}= Create Context Source Registration With Return ${registration_payload} Loading
resources/AssertionUtils.resource +10 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ Library RequestsLibrary Library Collections Library Collections Library JSONLibrary Library JSONLibrary Library String Library String Resource ${EXECDIR}/resources/ApiUtils.resource *** Variables *** *** Variables *** Loading Loading @@ -399,3 +400,12 @@ Check SUT Not Containing Resource Check SUT Not Containing Resources Check SUT Not Containing Resources [Arguments] ${response_body} [Arguments] ${response_body} Should Be Empty ${response_body} Should Be Empty ${response_body} Check Retrieving Context Source Registration [Arguments] ${registration_id} ${context} ${accept} ${registration_payload} ${response}= Retrieve Context Source Registration ... context_source_registration_id=${registration_id} ... context=${context} ... accept=${accept} ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes}