Commit Graph

152 Commits

Author SHA1 Message Date
Manuele Simi 5fe6234303 Add logger to RMContextTest.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162452 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-23 04:23:20 +00:00
Manuele Simi 34dcfec6e6 Load the default token from a property file. Skip the tests if the token is null.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162451 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-23 03:48:33 +00:00
Manuele Simi 4a7df8b36d Update tests for create context with or without parent. Still some pitfalls to address.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162408 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-22 04:31:01 +00:00
Manuele Simi eb900141e2 Validate the parent exists in the create operation, if specified in the input context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162406 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-21 20:38:19 +00:00
Manuele Simi 97e9f88f70 Use LocalCodeExceptions across delete and create contexts.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162405 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-21 20:34:21 +00:00
Manuele Simi 865c2255f7 Introduce error codes for the delete context method. Query the RR to validate the delete request.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162342 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 05:05:49 +00:00
Manuele Simi f1e50d4d15 Add step2_Delete test case to delete a context. The sequential tests now are able to create and delete the test contexts.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162341 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 04:15:31 +00:00
Manuele Simi 9c3f356eb4 Change UUID param for context delete to be a @PathParam.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162340 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 04:13:45 +00:00
Manuele Simi 53f07d6d61 RMContextTest: extend step0 to check the validity of UUID and name.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162339 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 03:13:34 +00:00
Manuele Simi f08c550f1d Rename RMCode to RMCreateContextCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162299 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-18 05:05:35 +00:00
Manuele Simi 60a49651a5 More work on delete method.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162207 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-16 03:57:22 +00:00
Manuele Simi b4faa918a5 Improve test cases for resource methods and queries.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162206 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-16 03:34:25 +00:00
Manuele Simi 54f89d7681 Migrate to use ResourceRegistryContextClient to query Contexts.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162169 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 12:14:41 +00:00
Manuele Simi 4336297bcd Starting to shape the DeleteRequest and delete resource method.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162161 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 03:55:32 +00:00
Manuele Simi 4c161325cd Add test case to fetch the Context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162160 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 03:29:33 +00:00
Manuele Simi ef245330c7 Queries to check if a context exists and to fetch a context given its UUID
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162159 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 03:19:32 +00:00
Manuele Simi 4e6d0a1192 Rename package exceptions to codeexceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162028 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 04:12:00 +00:00
Manuele Simi aedbeed7de Draft delete method's signature in the RMContext resource.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162027 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 03:13:01 +00:00
Manuele Simi 37b5f00beb Fix typo in RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162026 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 03:11:59 +00:00
Manuele Simi 8d4941ef21 Rename CodeException to LocalCodeException.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162025 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 03:09:32 +00:00
Manuele Simi 3b4e4b17a8 Improve javadoc. Rename one of the values for RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161971 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-04 20:09:37 +00:00
Manuele Simi fc90485dca Set calledMethod for create context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161941 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-03 03:41:33 +00:00
Manuele Simi 2240582f2c Add plain CodeException to use internally in the webapp. WebCodeExceptions can be created from plain exceptions now. New test cases for exceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161932 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-02 03:13:00 +00:00
Manuele Simi 8aff6e850e Adapt CodeExceptionTest to web exceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161931 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-02 02:57:11 +00:00
Manuele Simi a70350c9df Rename CodeException to WebCodeException to make it clear that it is a subclass of WebAppException.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161930 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-01 20:40:26 +00:00
Manuele Simi 5c9549160c Move RMCode to rs package. This keeps the exceptions package as more generic as possible.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161929 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-01 20:37:28 +00:00
Manuele Simi f94fd01063 Fix javadoc.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161928 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 19:21:11 +00:00
Manuele Simi c1c79bf30d Add CodeFinder helper class to find codes and convert them into their equivalent enum value.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161927 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 17:46:27 +00:00
Manuele Simi 0dbd823c26 Convert back the SerializableErrorCode to the correspondent RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161926 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 04:28:16 +00:00
Manuele Simi 38feed8fdb Remove fields in the CodeException. The code and associated message are held in the response embedded in the superclass.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161925 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 03:25:00 +00:00
Manuele Simi 77b0722bf1 Initialize CodeException from ErrorCode instead of RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161923 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-28 05:14:55 +00:00
Manuele Simi 33c6212530 Rewrite CodeException as a specialized WebApplicationException. Integrate CodeException in the create context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161922 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-28 05:06:00 +00:00
Manuele Simi 36dd483b04 Integrate CodeExceptions in the webapp.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161909 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:23:48 +00:00
Manuele Simi 0743f01692 Remove duplicated package-info.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161908 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:14:52 +00:00
Manuele Simi 228f1a54b8 Adjust test in error.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161907 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:13:55 +00:00
Manuele Simi 8fc30f39c6 Remove unused packages.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161906 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:07:49 +00:00
Manuele Simi 2c84b66dbe Rename test package to exceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161905 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:06:13 +00:00
Manuele Simi 05f3c6a810 Rename package to exceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161904 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 11:56:05 +00:00
Manuele Simi 8a09c93ce2 Move the test in the test source folder.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161897 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 03:48:19 +00:00
Manuele Simi 9e6e2299c8 Adjust the RM codes creation. Add test case.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161896 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 03:42:12 +00:00
Manuele Simi 9a9e0a0a06 Improve CodeExceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161895 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-23 04:26:08 +00:00
Manuele Simi 7b31392c6f Improve formatting.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161894 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-22 20:30:28 +00:00
Manuele Simi 4dccab1032 Skip tests that require a connection to Resource Registry when the token is not set.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161893 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-22 20:27:25 +00:00
Manuele Simi 57d6749dea Instead of creating separate classes for each exception type, create just one. Use enums to indicate the exception’s type. This reduces the class count and remove the need to declare ad-hoc exceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161800 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-22 04:48:51 +00:00
Manuele Simi 4b98621cc8 Create a failure response when the new context already exists.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160691 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-20 04:12:05 +00:00
Manuele Simi eb160612be Gives a chance to each request to validate the response from the RR.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160673 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-19 04:02:42 +00:00
Manuele Simi 5ad360fbb2 Remove unused test.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160672 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-19 03:57:44 +00:00
Manuele Simi 76183b49f2 Configure the jersey tests for RMContext resource with authorization permission.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160671 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-19 03:52:21 +00:00
Manuele Simi b95522d5ac Add a query parameter to context creation to force use a given RR instance. Mainly for testing purposes. Adjust the test accordingly.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160622 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-18 05:01:43 +00:00
Manuele Simi f4e1170f78 Avoid exceptions with Optional objects with no value.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160621 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-18 03:46:32 +00:00