aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap
AgeCommit message (Collapse)AuthorFilesLines
2020-05-08CamundaClient not handle operationType used by Activate5GSliceServiceInstanceshetengjiao1-1/+2
Issue-ID: SO-2911 Change-Id: I23a7628359439adeeec9f22302f64f4441939897 Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
2020-04-27refactor camunda client in apihPlummer, Brittany4-422/+125
Switched CamundaClient to use restTemplate Combined clients into one CamundaClient Initial setup of exception handling in camundaclient Initial fix of compilation issues Switched CamundaClient constructor Updated how url is set in CamundaClient Updated auth to fix tag mismatch warning Added throwing ClientConnectionException to client Updated ServiceInstancesTest cases Updated error handling for CamundaClient Updated how response is returned Fixed failing unit tests in apih infra Refactored response handler for responseentity Fixed failing unit tests in apih Removed old unit tests for client Import cleanup for unneeded changes Updated to use new CamundaClient Updated CamundaClient and ResponseHandler tests Removed unused RequestHandler Issue-ID: SO-2834 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I82ff489c9c939a7e8ec0e48476daf7e45baa5f20
2020-03-05create custom spring aop annotation for loggingPlummer, Brittany1-1/+1
Added annotation for setting up scheduled tasks logs Added new annotation to scheduledTasks Moved annotation setup to logging-library Issue-ID: SO-2713 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I7080c4bb289e454f14167631e2601c954389c0ef
2019-11-20vnf and vf module replace requests to makePlummer, Brittany2-55/+0
Added cloudConfiguration when not sent in replace request Added robot test for vfModule request with no cloud config Started adding unit tests for ServiceInstances Added unit tests for BpmnRequestBuilder changes Added ServiceInstances tests to test replace without CloudConfig Removed unused wiremock stubbings from test Added check for replaceInstanceRetainAssignments action Added action to common package to fix failing robot tests Removed new test, updated existing vfModule replace Added jackson annotations to RequestError object Fixed failing unit tests apih common Issue-ID: SO-2523 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I9470a0a9c7e356ef98ceb7269e066e79e0afb074
2019-10-31- Skip requestId lookup when uri isMerkel, Jeff1-0/+30
- Skip requestId lookup when uri is orchestrationRequests. - Reformatted code to fix the build error. - Updated mockContext in TC to mock up URI path. - Added a test that skips the requestId lookup. - Added verify to ensure the lookup method is not called. - Fixed the formatting to pass the verify build. Issue-ID: SO-2499 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I12a991032a8cd1b3664cc807fde568f89bf779fa
2019-09-24Update Resume Logic and Add Workflow ListenersSmokowski, Steven1-3/+3
Updated with the error log messages Changed the code to do string compare for eventName update workflowaction to only persist if not resume Issue-ID: SO-2363 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I139f2427ae0f0253a15cc51003318686568cb514
2019-07-29apih allowing requests with the same requestidPlummer, Brittany1-21/+39
Updated filters to throw error on duplicate requestId Added message indicating exception will be thrown Added unit tests for requestIdFilters Added access modifier in filter test Updated CloudApiRequests for successful deletion when InfraActiveRequest is deleted Removed changes from CloudApiRequests bean Updated repository to include deleteByRequestId Removed unused import from cloudApiRequests Removed deleteByRequestId from interface Updated to change type of extended jparepository Removed repository added for CloudApiRequests Updated uri check to remove '/' from checked string Updated returned on failing junit test Updated access modifiers for logger and createRequestError Issue-ID: SO-2166 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: Id0cee672567b15e0a3eb1acfbdfb967945494500
2019-06-14update multi stage code to accurately skip bbsBenjamin, Max1-0/+20
moved around classes to packages that make more sense updated license headers in java files converted MultiStage logic to FlowManipulator moved tests to new package location and fixed issues allow for custom listeners before flowsToExecute moved validation classes to listener.validation Change-Id: Ic5416812ef9c5611fe19bf9b6aa316373b110ec6 Issue-ID: SO-2021 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2019-05-30Improvements in RequestClientr.bogacki1-0/+60
Improvements in RequestClient according to the Sonar analysis. Removed unnecessary exceptions handling. Added junit tests. Fixed imports. Issue-ID: SO-1945 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com> Change-Id: Iee22e7dbeb39ca28c437f9a8a804b81945cb9bc5
2019-04-08Replaced all tabs with spaces in java and pom.xmlBenjamin, Max (mb388a)12-311/+317
Added in maven plugins to enforce coding style rules Added in eclipse java formatting xml Change-Id: I3727bbf4ce8dc66abfd8ad21b6cfd0890c5d3ff0 Issue-ID: SO-1765 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2019-04-08Do not overwrite requestIdBenjamin, Max (mb388a)1-0/+68
Added filter to reject requests that reuse request ids for requests db Change-Id: Iced020a9e1bc98c93911966f62ac0049e43e314b Issue-ID: SO-1762 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2019-03-25JUnit tests for CamundaClientr.bogacki1-0/+18
Increased junit tests coverage according to Sonar analyses. Change-Id: I52b13399c03bae4efbb0a5a7daf8eb9fde40d244 Issue-ID: SO-1692 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
2019-03-18Removed MsoLogger classr.bogacki1-3/+2
Bye bye MsoLogger class. Extracted constants to separated classes. Fixed imports. Change-Id: I7c8e0527e7dbd097d3ea93b9dab279354652da47 Issue-ID: LOG-631 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
2019-02-28CorrelationId cleanupJoanna Jeremicz1-2/+2
Remove old correlationId field and references from ServiceInstancesRequest and rename correlationId to pnfCorrelationId Change-Id: I5d8861aebe14c68574b6c54bc8d4eadf2967478b Issue-ID: SO-1274 Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com>
2019-01-24Removed deprecated Matcher importsBenjamin, Max (mb388a)2-3/+3
replaced org.mockito.Matchers with ArgumentMatchers Change-Id: I2feb4d4fb314cd14aca0719c4cc29b1a0510cbf7 Issue-ID: SO-1413 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-11-27Remove all usage of AlarmLoggerBenjamin, Max (mb388a)1-7/+5
Fix broken UT from removing alarm logger fixed compilation and merge issues Remove all usage of AlarmLogger Change-Id: Ic87abd51423274570bfca0ed976d9642a91a843d Issue-ID: SO-1229 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-11-14accept a la carte create instance group requestBenjamin, Max (mb388a)1-1/+2
Updated postBPELRequest to accept RequestClientParameter Switched to using .toString rather than .name for enum Added source to fix failing test Added action to fix failing apih tests Removed unused headers from test Removed unused import from RequestClientParameter Updated to use instanceGroupId constant Removed defaulting source in requestInfo Added validation for mandatory headers Added test case for modelVersionId in service related instance Added relatedInstance validation for create instanceGroup Added unit test cases for MembersValidation Added test cases for relatedInstances validation Added tests for add/remove member validation Added updates for deleteInstanceGroups Removed serviceProxy from test resource file Removed ServiceProxy as it is no longer needed Changed action to be removeMembers in endpoint Added removeMembers endpoint and validation Updated validation for create instanceGroups ... Change-Id: I12b14d6d81dd0690eea33dfcbf1be17c509f9832 Issue-ID: SO-1207 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-11-05Springboot 2.0 upgradeBenjamin, Max (mb388a)3-43/+54
corrected typo in CloudConfiguration class removed files which should not have been merged updated gr api test cases with dynamic cloud owner updated groovy files to allow for dynamic cloud owner values moved VFModularity folder to mso-infrastructure bpmn updated GR API layer to include cloud owner added enum for default cloud owner - fixing junit test cases for using catalogDb client r2 - fixing junit test cases for using catalogDb client - Internal review comments incorporated for merging mocking into BaseTest - Internal review comments incorporated for removing direct repo calls - CLONE - Key Management Hardcoded encryption key | fixing junits - CLONE - Key Management Hardcoded encryption key Updated builder to use String.format Added exception specifically for issues interacting with requestdbadapter Updated exception message and added junit test case removed useless error handling test case from workflow changed method name and added junit coverage to errors added max retry and success status after completed bb Added case to handle when homing is not called during assign vnf. Fixing fortify issues | Implementing review comments - Key Management Hardcoded encryption key - fixing prop files - Key Management Hardcoded encryption key include network ID for completion handler Added exception handling for saving to requestdb - Adding a check on the predicate availability on the repository before firing the query with default conditions. This ensures that the api returns data only when there is an input against which it was able to form some conditions Modify UT to show that the API does not behave - adding negative test case for checkInstanceNameDuplicate added assertion that global count var was reset to 0 updated rollback to reset current sequence count var workflowaction calls rollback is complete before error workflowaction will set failure on successful rollback added check for isrollback to know which complete to call removed file which should not have been added add fabric check before running vf module a la carte Enhance UCPEMigrateService junits and add them to Jenkins build.. Added back removed test case for ManualTasks Added test case for response error Added rainy day test cases for ManualTasks revert the other change and fix the rollback logic instead fixed current sequence and updated rollback code added network cloud heat template parameters to mapper Generate a unique subRequestId for each request to APP-C. reverted conditional logic for determining fabric Fix Bean scanning so it picks up the resttemplate removed unnecessary RestTemplate Bean configurations removed file which should not have been added workflowaction calls rollback is complete before error workflowaction will set failure on successful rollback added check for isrollback to know which complete to call add fabric check before running vf module a la carte added assertion that global count var was reset to 0 updated rollback to reset current sequence count var include network ID for completion handler Revert Application.yaml change accidentally checked in Added exception handling for saving to requestdb Added case to handle when homing is not called during assign vnf. removed useless error handling test case from workflow changed method name and added junit coverage to errors ... add cloud owner variable to camunda in mapping Revert "Pass cloudOwner to subflow DoCreateVfModuleVolumeV2. Added juint test to verify variables are set in the execution. Set default cloudOwner in main module CreateVfModuleVolumeInfraV2" updated cloud configuration pojo to inlcude defaults Revert "Test to verify ServiceInstance object mapping" Test to verify ServiceInstance object mapping Pass cloudOwner to subflow DoCreateVfModuleVolumeV2. Added juint test to verify variables are set in the execution. Set default cloudOwner in main module CreateVfModuleVolumeInfraV2 Pass cloudOwner to subflow DoCreateVfModuleVolumeV2. Set default cloudOwner 'att-aic' if null per old requirements. removed references to att-aic from BBInputSetup Changes done in encryption decryption logic | used DelegateExecutionFake in Tests Changes done in encryption decryption logic | used DelegateExecutionFake in Tests Changes done in encryption decryption logic Changes done in encryption decryption logic | removed Default Auth Constant as per the comments Changes done in encryption decryption logic | Fixed UT Changes done in encryption decryption logic | Added XmlComparator assertion for verifying XML Changes done in encryption decryption logic | Reverted as per the review comment Changes done in encryption decryption logic | Fixed UTs Changes done in encryption decryption logic | Fixed UTs Changes done in encryption decryption logic | modified related encrypted properties in test yaml files Changes done in encryption decryption logic for fortify issue resolution | Fixed UTs Changes done in encryption decryption logic | modified related encrypted properties in yaml files Changes done in encryption decryption logic for fortify issue resolution. Fixed Property fetching issue in required file Added TasksBeansTest using openpojo Removed renamed test file from tasksbeans Updated imports on TasksBeansTest Added openpojo test to replace the individual tests Removed tests that provided no coverage script clean up -Update reference data to support distinct recreate and replace requests with their own sequences Update reference data to support distinct recreate and replace requests with their own sequences- Fix seq number Update reference data to support distinct recreate and replace requests with their own sequences added null check to mdc and interceptors to sdnc cxf validations can now match against multiple BBs reverted changes to BBInputSetup class added support for pre and post validation for BBs initial commit of generic building block validator converted test to no longer be a springboot test Remove cosmetic changes from BPMN files to be consistent. Remove minor changes that are not related to functionality. Rework to implement the functionality as part of Validator Combine the verification methods into one based on the flow's name; change the logging. Add verification of status of other VF Modules in the VNF for the delete/deactivate/unassign. added network-technology validation for CreateNetworkBB Sonar Issue Fix | Changes done in encryption decryption logic | Refactoring Changes done in encryption decryption logic| Used AES/GCM/NoPadding algorithm | fixed sonar issues added network-type and network-technology to mapper Continue the fight to make JUNITS work properly Update ASDC ATT to be springboot 2.0 compliant Continue to fix Unit tests for springboot 2.0 port removed autowired from workflowactionbbtaskstest fixed workflowactiontest and reduced size by 500 lines Update last of UT for mockito upgrade to 2.0 Fix more JUNITS due to mockito 2.0 upgrade Unit Test fixes to use proper mockito not spring Update Base Test to import proper packages for compile Additional Springboot 2.0 changes, for tests Additional springboot 2.0 fixes and upgrades Update Migration to be Flyway 5 Compliant Fix MSOBPMN Infrastructure common tests Fix Groovy Unit Tests in CommonBPMN Project Update MSO common BPMN to Springboot 2.0 Upgrade ASDC controller to SpringBoot 2.0 Port Openstack adapters to springboot 2.0 Fix VFC Adapter to be springboot 2 compatible Port CatalogDB adapter code to springboot 2 Port SDNC Adapter to Springboot 2.0 ... added update scripts to macro data instead of v12 sql added secondarypolicy to rainy day handling table confirm subnet map is not null in adapter response shallow copy subnet before AAI udpate update AAIObjectType to use uriTemplate extract subnet data from adapter response update correct AAIObjectType for subnet query update subnet(s) in AAI on network create completion confirm subnet map is not null in adapter response shallow copy subnet before AAI udpate update AAIObjectType to use uriTemplate extract subnet data from adapter response update correct AAIObjectType for subnet query update subnet(s) in AAI on network create completion fixed test http entity unit test to remove testing appid and transaction id added unit test for querySubsystemHealth method. also added resttemplate mock to implement healthcheck endpoint fixed unit test to use mock instead of actually goes out to health check endpoint added code to extend globalhealthcheck to include pinging other components and consolidate the responses converted test to no longer be a springboot test Remove cosmetic changes from BPMN files to be consistent. Remove minor changes that are not related to functionality. added update scripts to macro data instead of v12 sql Rework to implement the functionality as part of Validator added secondarypolicy to rainy day handling table added network-type and network-technology to mapper Combine the verification methods into one based on the flow's name; change the logging. Add verification of status of other VF Modules in the VNF for the delete/deactivate/unassign. updated how request db is set to failure in workflowA corrected code to match existing unit tests corrected tests after springboot 2 upgrade Added Required UTs in UpdateConfigurationStateTest and also fixed some UTs. added in missing parenthesis on method call added back execution variable for allotted uri addressed comments on pull request refactor AAI Rest calls from groovy files - Changes as per review comments checkin to refactor AAI rest | Fixing AAIResourceClient.update call refactor AAI Rest calls from groovy files - UpdateConfiguration refactor AAI Rest calls from groovy file - DeleteConfiguration refactor AAI Rest calls from groovy file - UpdateConfiguration refactor AAI Rest calls from groovy file - CreateConfiguration & ConfigurationUtils refactor AAI Rest calls from groovy files - Fix getARByID issue checkin to refactor AAI rest | Adding Junits checkin to refactor AAI rest | Adding few more classes checkin to refactor AAI rest of DoCreateVfModuleVolumeV2 checkin to refactor AAI rest | Update junit checkin to refactor AAI rest of DoCreateVfModuleVolumeV2 | Adding junits checkin to refactor AAI rest of DoCreateVfModuleVolumeV2 | Adding junits checkin to refactor AAI rest of DoCreateVfModuleVolumeV2.groovy ... updated in and out mapping to be generalBuildingBlock change source out mapping to generalBuildingBlock Change-Id: I122f1ebe3e15b77da0a55af201d89d47e326bf83 Issue-ID: SO-1098 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-09-21Merge "added test case to ResponseHandlerTest.java"Seshu Kumar M1-11/+19
2018-09-18added test case to ResponseHandlerTest.javaSandeep J1-11/+19
to increase code coverage Issue-ID: SO-153 Change-Id: I0829b1c49756eb5f30a618d3ef7d22dbb242126d Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-09-18Merge "added test case to CamundaClientTest.java"Seshu Kumar M1-34/+52
2018-09-17Accept header not honored when building exceptionBenjamin, Max (mb388a)1-14/+77
added accept headers to http entity request mappers were looking at "Content-Type" and not "Accept" modified test to no longer share global headers added additional tests and corrected comparison errors Fixing issue with comparing media types, the equals method in MediaType.class uses parameters as well to compare, added a method to just compare the type and subtype and get done with it Fixing test failures, getMEdiaType would come as null in most cases, this causes the defautl serialization mode to be picked which is xml. tests now pass with exception providers in place exception providers now handle JSON and XML Dumy push to re-trigger the build which failed at sonar evaluation Trying to fix the build by removing different spy's Returning XML instead of JSON in cases of error for endpoints. Removed exceptions and its generic handler which is a good thought, however given that the exceptionhandlers are generic it gets tough to return to handle exceptions which require different namesaces in response amongst other problems. Change-Id: I684fe3b0047693093a99aa999faf261d7713f404 Issue-ID: SO-1058 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-09-17added test case to CamundaClientTest.javaSandeep J1-34/+52
to increase code coverage Issue-ID: SO-1053 Change-Id: I34f287041f5f09cf0c37a0c9babe9719a6d5ce97 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-08-10Fix Error ScenarioSmokowski, Steve (ss835w)1-1/+1
If Camunda returns a non-auth error, or invalid JSON. APIH was not logging the error or properly updating the request database record Issue-ID: SO-818 Change-Id: I8b164002132ca6c25f95e1fa2b194e6cb4c3be03 Change-Id: If6e06de0fb8a01a00ef06ade915dd7c13623047b Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
2018-07-31Containerization feature of SOBenjamin, Max (mb388a)11-0/+1097
Change-Id: I95381232eeefcd247a66a5cec370a8ce1c288e18 Issue-ID: SO-670 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>