-
femiadeyemi authored
Motivation: The organisations api can handle varieties of request. Since this will evolve over time, integration tests are needed to ensure that basic functionalities are not broken when a new patch is submitted. Modification: - add various tests scenarios to cover all HTTP methods in the organisations API - adjust the organisations controller: - post method to return 201, location url in the header and a json body that contain the newly create organisation - put method to return 200 if the uuid already exist or 201 if it is a new uuid. - get, put and patch will first check the validity of the uuid and thrown and exception if the uuid is invalid. - change the return type of deleteUuid from void to long - create CerebrumInvalidUuidException which will be use for invalid uuid - add two exceptions to the CerebrumExceptionHandler which are CerebrumInvalidUuidException and HttpMessageNotReadableException (this is for malformed json or json+patch) - add tests to check that CerebrumExceptionHandler handle those two new added exceptions - fix some minor bugs inside CerebrumEntityUuidGenerator - obtain and set aai token variable that will be use by the ci Result: Improve test coverage for organisation API and some minor bug fixes. Target: master Acked-by: Franz Stephan Review-at: https://gitlab.hzdr.de/hifis-technical-platform/helmholtz-cerebrum/-/merge_requests/20
937ce44b