Hi, I created a new PR which does not have any changes of our team’s FTP-support contribution. I was able to write tests for all the transports except for FTP and GDrive since they're not yet merged to airavata-mft. Once this PR is merged, other teams can down merge from upstream and write their own tests.
Pull Request: https://github.com/apache/airavata-mft/pull/18 Dependencies that were added: junit5 jupiter-5.6.2 for mft-core, resource-service/server, secret-service/server Mockito-core 3.3.3 for mft-core, resource-service/server, secret-service/server MockMaker mockito plugin for mocking final classes added to source-service/server, secret-service/server Dependencies for other transports IN TEST SCOPE had to be added for the ‘core’ module for writing tests for ConnectorResolver.java and MetadataCollectorResolver.java Tests: TestConnectorResolver.java for ConnectorResolver.java - 25 test cases TestFileBasedResourceBackend.java for FileBasedResourceBackend.java - 16 test cases TestFileBasedSecretBackend.java for FileBasedSecretBackend.java - 12 test cases TestMetadataCollectorResolver.java for MetadataCollectorResolver.java - 9 test cases TestResourceServiceHandler.java for ResourceServiceHandler.java - 80 test cases TestSecretServiceHandler.java for SecretServiceHandler.java - 52 test cases TestSQLResourceBackend.java for SQLResourceBackend.java - 13 test cases Total - 207 unit tests Since none of the classes had any unit tests, a lot of tests had to be written for detecting as many edge cases as possible for all the transports. I've made sure to keep the refactoring to a minimum. Could anyone please review and suggest any necessary changes if any. Regards, Vivek. From: "Bandaru, Vivek Shresta" <vivb...@iu.edu> Date: Friday, May 1, 2020 at 11:39 PM To: "dev@airavata.apache.org" <dev@airavata.apache.org> Subject: MFT Unit tests Hi, I just wanted to get feedback from the community about the test case I've written till now. Please do suggest any changes if any before I go ahead and write more testers. I didn't face the need to refactor any code to write unit tests till now, but I'm not sure if that'll be the case all the time. Please let me know if it's okay to refactor the code for making the code unit testable. (For instance, refactoring to inject Mocked dependencies whenever necessary) Pull Request: https://github.com/apache/airavata-mft/pull/16 Regards, Vivek.