Adapt 404 response when delete non-existent element 33/44933/2
authorJose Luis Franco Arza <jose.luis.franco.arza@ericsson.com>
Wed, 31 Aug 2016 12:29:32 +0000 (14:29 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 7 Sep 2016 17:56:43 +0000 (17:56 +0000)
commit36c709e784d0c33716c6d742e66817f0b08feb59
tree3c1708a3a104d57d11f87ef583c6da907abea64b
parentee4496fb804ee8ce90ce0a5796ba9484e52bf37a
Adapt 404 response when delete non-existent element

Add new function "Remove All Elements at URI If Exists" inside Utils.robot
which sends a Delete REST request only if the element sent as input
parameter exists in the datastore.

Delete all calls to "Remove All Elements at URI" at the beggining of every
test case, which was used as "test case setup" and add a Robot FW Test Case
Setup calling the function "Remove All Elements at URI If Exists".

Adapt test cases verifying the deletion of a non-existent element to avoid
calling "Remove All Elements at URI". This function checks that the
result code returned is (200, 201 or 204) and since boron release a 404 is
returned if the element to be removed does not exist in the datastore.
Instead, a delete request is sent and it is checked that the result
obtained is 404 when the element is not present.

Change-Id: Icfba27e646a19aa27f1be24afc398c87b7323ebf
Signed-off-by: Jose Luis Franco Arza <jose.luis.franco.arza@ericsson.com>
csit/libraries/Utils.robot
csit/suites/sfc/SFC_Basic/010__sfc_service_functions.robot
csit/suites/sfc/SFC_Basic/020__sfc_service_forwarders.robot
csit/suites/sfc/SFC_Basic/030__sfc_service_nodes.robot
csit/suites/sfc/SFC_Basic/040__sfc_service_chains.robot
csit/suites/sfc/SFC_Basic/050__sfc_service_schedule_types.robot
csit/suites/sfc/SFC_Basic/060__sfc_service_paths.robot