aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test
AgeCommit message (Collapse)AuthorFilesLines
2024-11-04Fix references and organize dependencies in policy-distributionadheli.tavares4-27/+24
after splitting policy-endpoints and message-bus in policy-common Issue-ID: POLICY-5131 Change-Id: I93082f1db411c3f2c55244cca355ecce7f4e4dea Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-07-03Fix junit4 leftover usageadheli.tavares1-2/+2
Issue-ID: POLICY-5027 Change-Id: Iacc3e4192f51c75d2ca1c0c1a38ab9c5996f32bf Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-02-07Fix RestController usage after removing AAF filteradheli.tavares2-10/+9
- some of AAF filter were attached to deprecated dmaap dependency Issue-ID: POLICY-4402 Change-Id: Iba3cf4de5da685ecda7a718b4eb44d1b199942d8 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Upgrade Java 17adheli.tavares13-293/+289
Issue-ID: POLICY-4803 Change-Id: Iad0d08ee6f8ab18eb177b458d8edbba4002bcc73 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-08-08Removed db-based statistics featureSuresh Charan3-292/+0
DB-based statistics code cleanup Issue-ID: POLICY-4109 Change-Id: I298d6c1df6916e399694b4f98e4ef5355deb16af Signed-off-by: Suresh Charan <suresh.charan@bell.ca>
2022-04-13Remove generated test file from gitliamfallon1-64/+0
This test file was checked into source control but it is a test file. Issue-ID: POLICY-4070 Change-Id: Iecb43ca32c5de7013a0566ca208b977b5bac60a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-03-02Rename ControlLoop to AutomationCompsitionSirisha_Manchikanti1-1/+1
Issue-ID: POLICY-3938 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: I63188fa9bc5d634d3aeb7e2d7051c4d67b5a202c
2022-01-06Add ControlLoop distribution to runtimeSirisha_Manchikanti1-0/+64
This commit unpacks the csar received either from SDC or for local verification from file-system, prepares the toscaservicetemplate with needed node-types and data-types, forwards the template to controlloop runtime components for commisioning of controlloop. Issue-ID: POLICY-3808 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: Ib3600542aca7b32ae19242c2f924bdaf2ab870a8
2021-07-05Use lombok in policy/distributionRam Krishna Verma2-8/+10
Issue-ID: POLICY-3393 Change-Id: I4221d8c6ecff3b529e7cd65f467bcf9bd3ac758d Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-05-25Fix broken junits in policy-distributionJim Hahn5-29/+61
Changes in policy-common broke some junits in policy-distribution. Some issues were due to the use of lombok ToString annotations, while others appear to be due to parameter groups being previously registered - don't really know the issue there, though probably the parameter group name is now being set, while it wasn't before. In any event, fixed the junits. Issue-ID: POLICY-3298 Change-Id: Iaca9b2ec2c42582e9083ad5825c84cdc8ebc9d6c Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-29Remove GroupValidationResultJim Hahn9-148/+124
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Issue-ID: POLICY-2059 Change-Id: Ib5c0dc0ac3762e68307e63f5ce29efb49208e55d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-16Refactor DistributionCommandLineArguments classadheli.tavares2-115/+111
CMD Class to use the CMD Handler from Common. Issue-ID: POLICY-3129 Change-Id: I2219cdb7db5669de71c3b2b90c496321b61d14eb Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-03-19Delete keystores from distributionJim Hahn3-11/+10
The Keystore is no longer needed in the tarball, as it is supplied externally by the CSITs and Helm charts. Deleted that file. Also modified the junits to use utils-test to generates keystores at runtime, thus deleted the junit keystore file, too. Issue-ID: POLICY-3143 Change-Id: I9daf6da10f2027880c260bd6f529bf6c6e7c2e91 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-16Update policy-keystore with newer certificatesjhh1-0/+0
Issue-ID: POLICY-3139 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7e228797bc5f51715c86141a279a990699fa6fe4
2021-03-04Code coverage for Policy distributionadheli.tavares2-1/+95
Added code coverage for some missing instructions on main package Issue-ID: POLICY-3090 Change-Id: I1ba870a4b3c7f63f6c00dfc3f4b908eee7ca701b Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2020-09-30New sonars in policy/distributionJim Hahn1-200/+81
Addressed the following sonars: - extract common test methods Issue-ID: POLICY-2713 Change-Id: I2c8e957785b7e0d1b66e3bd49d5a8a854149fffd Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-24update default keystoresjhh1-0/+0
Issue-ID: POLICY-2827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: If5da9a12dad83b3b596ff5e1ac2c1f8fc0987b9c
2020-08-21Changes to make policy-distribution container crash with non zero exitCodea.sreekumar1-12/+16
Change-Id: Ic637253513b349ccb3f17b7c3fce1414bd5ec022 Issue-ID: POLICY-2756 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-07-29Allocate a new server port for each testJim Hahn8-71/+97
Junit tests were failing randomly on the build server, perhaps due to the fact that multiple tests attempt to bind to the server port, 6969. Modified most of the tests to allocate their own server port. Issue-ID: POLICY-2713 Change-Id: If40eef7989c9a46e2d458d915ed5bd0281ff0b0d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-29Sonar fixes for policy/distributionuj426b2-16/+13
Change-Id: Ia48406096706daaa6a98985c488b4055276863d3 Issue-ID: POLICY-2713 Signed-off-by: uj426b <uj426b@att.com>
2020-07-02Replace try/catch blocks with assertj - distwaynedunican7-230/+141
Replaced try/catch blocks in policy/distribution test cases with assertj assertions Issue-ID: POLICY-2451 Change-Id: Ib7ecd13e39abd471bf1424d8a3db22c72ad1e3b8 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-06-19Changes for Checkstyle 8.32 in policy-distributiona.sreekumar14-22/+4
Change-Id: I8f9324279f24cc3b9d26f265c3dacd5b61ce856b Issue-ID: POLICY-2188 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-03-27Fix comments from last reviewPamela Dragosh1-1/+1
Issue-ID: POLICY-2305 Change-Id: If0778cb7bdade11575cab12c4742274939cd22c7 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-26Remove unused imports and clean logsPamela Dragosh2-3/+48
Unused imports and marked an unused variable. Added m2e eclipse settings (other repos have this). Added some test logback.xml to clear out jetty debug messages. Replaced deprecated newInstance with getDeclaredConstructor. newInstance Either log or throw Exception - chose throw Added some assertions to JUnit test. Issue-ID: POLICY-2305 Change-Id: Ia4e9ce62dc7fb45aea247d470ca7245e694fc26e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-18renew policy certs till 03/17/2021jhh1-0/+0
Change-Id: Ic3089d7c8697e500d49d454dfd21e9360a4df893 Issue-ID: POLICY-2402 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-01-22policy/distribution jdk11 upgradesHOCKLA5-8/+21
Issue-ID: POLICY-1585 Change-Id: I4aa879656c039d9de9c288f0309105c21f4bf285 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-05change HealthCheckReport URL from self to hostNameHengye2-6/+8
Issue-ID: POLICY-1689 Consolidate Policy Health Check into PAP Change-Id: I00e17610d3e4788008649791c684c0af415863ee Signed-off-by: Hengye <yehui.wang@est.tech>
2019-08-22update keystorejhh1-0/+0
Change-Id: I4b3bb5f76d58477132cebef3410be547f2adf41d Issue-ID: POLICY-1988 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-08-06Changing parameters to use ParameterGroupImplramverma5-119/+40
1. Changing all the decoders & handlers parameters to use ParameterGroupImpl. 2. Fixed all the test cases. Issue-ID: POLICY-1890 Change-Id: I4a124c0acc650020977ac8e2cee143c72003973a Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-08-02Change parameters to extend ParameterGroupImplramverma3-111/+37
1. Changing all the forwarder parameter groups to extend the ParameterGroupImpl instead of implementing the ParameterGroup interface. 2. Introducing lombok in distribution. 3. Fixing all the affected test cases. 4. Creating parameter group to hold parameters needed for forwarding policies to the new lifecycle API's. Issue-ID: POLICY-1890 Change-Id: I0c8b72f355a610fa5d46daaacc9ef7f06b7cec09 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-07-19Modify policy/distribution to use RestServer from commonJim Hahn7-24/+43
This also entailed removing the local copy of RestServerParameters. Also added an AafFilter, which was missing from the original code. Change-Id: Ibbdce8c395e0149ab540a3704b3554a9d96b9705 Issue-ID: POLICY-1652 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-17Changing policy/distribution to use policy/modelsramverma2-10/+11
1) Changed policy distribution framework to use entities from policy/models 2) Changed all the test cases. 3) Commented few test cases which will be fixed along with code fixes. 4) Will be removing the old policy entities once all the pieces are ready. Change-Id: I1fd7b975b2e072c0b24e429903c9ca4796173929 Issue-ID: POLICY-1888 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-07-02Use ToStringTester from utils-testramverma1-1/+1
Changing ToStringTester from utils to utils-test. Bumping the policy/common, policy/engine & policy/models version. Change-Id: Id1f1b3f9a4a378c14d1adf2823aaa4c8626c8fd2 Issue-ID: POLICY-1746 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-06-18Fix junit tests in distributionJim Hahn2-4/+4
Sonar fix broke some of the junit tests for parameters; fixed those. Also fixed some checkstyle errors (e.g., unused imports). Change-Id: I76c57792b82b9c2ddd27bdbc35910e9b11d86ea5 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-05Change policy/distribution logging to slf4jramverma4-122/+132
1) Changed logging from FlexLogger to SLF4J with logback 2) Fixed test cases of distribution REST endpoints having infinite while loop Change-Id: I1551873b3d348f9a7d2b4f8dfc3ae5dd6462bdb8 Issue-ID: POLICY-1346 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-01-11Fix Noncompliant usage sonar issueliboNet3-6/+4
remove the Thread.sleep about such noncompliant usage rename the funciton name for codestyle's alignment Change-Id: I71b66143d7d68fa58a1a60de70e1836fde7df8c4 Issue-ID: POLICY-1256 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-12-20Fix checkstyle issues in distributionliamfallon2-50/+38
Some fixes for minor checkstyle issues. Issue-ID: POLICY-1221 Change-Id: I86577f47283a6fa97be25d7550ed9c2d7ec026a9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-19add Https support for distribution endpointsliboNet5-2/+354
. add the https into the RestServerParameters interface . update CommonTestData to support https interface . add two cases for healthcheck and statistic https validation . update the package script to use JVM properties . add keystore and truststore to resources dir . update the keystore path for consistency Change-Id: I04b2a3e1afef84eafbb6a22e6fe2122a5a181883 Issue-ID: POLICY-1221 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-09-14Merge "Adding statistics endpoint to distribution"Liam Fallon2-0/+176
2018-09-13Adding statistics endpoint to distributionramverma2-0/+176
* Adding statistics endpoint in DistributionRestController * Adding DistributionStatisticsManager to hold all stats. * Adding StatisticsReport class to represent distribution stats report. * Updating stats at each step in SdcReceptionHandler. * Adding test cases for all code changes. Change-Id: I0b0f97aecc64b18314367fdff6d3ca7bee06efc7 Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-09-13Adding policy decoder to extract file from csarramverma23-95/+507
* Adding decoder configuration parameters infrastructure to support plugin based architecture. Adding a new policy decoder after this will be just creating a new decoder class and its corresponding parameter class. * Adding a new decoder which extracts policy file from given csar. It is written in a generic way to extract file for any pdp like apex, drools. * Adding configuration parameters for the new decoder. The policy file name and policy type is passed as parameter to the decoder. * Fixing few broken package declaration in pdpx decoder tests. * Adding test cases for all code changes. Change-Id: I95e68cebce0f9747ca63b090f9b9116ce8836939 Issue-ID: POLICY-1101 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-09-11Fix all sonar issues in distributionramverma3-22/+171
* Fixing all sonar issues in distribution * Adding more test cases to improve code coverage Change-Id: I296f96b66046e25c3c462632091f40565ff75478 Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-09-07Parameter Group fields must have gettersliamfallon2-2/+2
Parameter handling is changed so that all fields must have a getter following normal naming conventions. This change brings that in. Issue-ID: POLICY-1095 Change-Id: Idc61960347a67c50f33fc272dcd00ceca7553d95 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-05Refactored reception handler parameter handlingmmis18-390/+402
Refactored parameter handling for configuration of reception handlers as the previous implementation does not align with the plugin architecture (.e. plugin specific parameters being handled in core code) Issue-ID: POLICY-1094 Change-Id: I31a9fc7f712ca43f0f69c42a6d99fa481b02cd4b Signed-off-by: mmis <michael.morris@ericsson.com>
2018-09-04Merge "Set Activator alive to false in terminate"Pamela Dragosh1-0/+3
2018-09-03Set Activator alive to false in terminatekrishnajinka1-0/+3
During terminate the alive status should be set to false instead of true Adding test case to cover the scenario Issue-ID: POLICY-1017 Change-Id: I5c1d13172902cc75da8d0819e6e107b4e8d1b246 Signed-off-by: krisjinka <kris.jinka@samsung.com> Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-08-30Create code infrastructure for policy forwardingmmis20-74/+556
Added sending of polices from the policy forwarder to the xacml PDP and added handling of parameters for configuring the policy forwarders Issue-ID: POLICY-926 Change-Id: I26effe70769f7edc765470a1a9ad40ed9faad82d Signed-off-by: mmis <michael.morris@ericsson.com>
2018-08-29Parameter Service Interface Changesliamfallon5-143/+135
Changes to distribution due to changes to parameter services, mainly addition of setName() to parameter service interface and correct handling of empty parameters Change-Id: I9523da6461874241d220f0feac61419ef6ebbb9d Issue-ID: POLICY-1035 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-08-28Removing plugin dependency from distribution mainramverma28-617/+362
* Removing plugin dependency from main. Ideally main should not be dependent on plugins. * Creating dummy handler, decoder, forwarder classes for test cases in main. * Combined few json test files. * Added more test cases. Change-Id: Id75e21d5d403febd9ac2b059661e17663d638dc2 Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-08-24Fix sonar and checkstyle issues in distributionramverma6-84/+94
* Fixing all check style issues. * Fixing all sonar issues. * Adding maven check style plugin to fail at warning level. Change-Id: I791b8feef39a3a0c3e1e250efea7b6e78208bf07 Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>