aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/test/java
AgeCommit message (Collapse)AuthorFilesLines
6 daysIncrease code coverage overallHEADmasteradheli.tavares2-9/+1230
Issue-ID: POLICY-5068 Change-Id: I1763d3c00392ac655a998cd2fb869748a7323812 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
9 daysIncrease code coverage in policy-core and policy-utilsadheli.tavares2-112/+143
Issue-ID: POLICY-5068 Change-Id: I598b674fd623ff56c2e7b0316c114e7c270c2b3f Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-09-12Increase code coverage in policy-managementadheli.tavares18-186/+2206
Issue-ID: POLICY-5068 Change-Id: Ie7ac44a948fe559306b1aa3a403d888c352be7f2 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-08-15PostgreSQL support for Droolsadheli.tavares1-8/+8
- moved all sql related management to db-migrator - any hardcoded variable related to database is configurable Issue-ID: POLICY-5107 Change-Id: I789895773ba8737651f68a0b494f72f947a147d1 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-04-24Fix topic configurations.adheli.tavares1-0/+4
- adjust kafka configurations - remove UEB references Issue-ID: POLICY-4955 Change-Id: Ie3ff62a0ba5531ae4c0d123f214a50bb7f721807 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-04-10Dependency management updateadheli.tavares2-156/+77
- including dependencies to pom.xml files only where they are used, avoiding extra dependencies being added in all packages. Issue-ID: POLICY-4945 Change-Id: I376ea0763190d55f254dc8f88b6fa5b89354e8b9 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-03-15Make drools-pdp work with drools and java versions compatibleadheli.tavares3-10/+0
with current DRL rules files syntax. Issue-ID: POLICY-4857 Change-Id: If4b385bdef865d07114b8ea0e69abb4589f3a97b Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-02-09Removing deprecated DMAAP libraryadheli.tavares25-846/+855
Issue-ID: POLICY-4402 Change-Id: I4ce5b303cb3a775010683d3c7102b0bd065280ea Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-01-09Drools support for kafka topicsadheli.tavares1-3/+4
Issue-ID: POLICY-4201 Change-Id: I91676c168c676018aa1079943747f16917f50a49 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-10-04Remove AAF from drools-pdpadheli.tavares2-22/+23
Issue-ID: POLICY-4592 Change-Id: Ibe7fb63017f862bdab4a80444a00324040b1ab87 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Upgrade java-17 in drools-pdpadheli.tavares1-1/+1
Issue-ID: POLICY-4676 Change-Id: I85a0f6303b30cd0405d63be003c9288f59a9d6b7 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-02-10Removing Drools-pdp swagger annotationslapentafd1-0/+11
Added swagger extracted documentation in openapi.yaml for lifecycle, legacy, management and healthcheck. Added new endpoint to retrieve the generated swagger.json Modified endpoint in telemetry tool Issue-ID: POLICY-3465 Change-Id: I003aaf128b1a4991ffe6b79f0659d1bd0137b52d Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2023-01-31Upgrade and clean up dependenciesliamfallon3-29/+29
- Upgrade Hibernate - Upgrade Mockito - Upgrade Mockserver - Remove Powermock (no longer supported) and replace with spring-test ReflectionTestUtils - Upgrade Spring Framework - Add spring-security to allow authentication on unit tests using MockMVC Minor clean-up - Replace deprecated authorization configuraiton on spring boot applications with SecurityFilterChain bean - Change @LocalPort include on tests to use test include rather than runtime include - Remove unused imports - Remove unused constants and variables - Add deprecation annotations where required Issue-ID: POLICY-4482 Change-Id: Ibc2097f6d832a893c9e99a01b79121c28ba878ad Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-10-19Support optional cluster name in policy enginejhh2-6/+40
This allows also for correlation with running pod hostnames in the case of multiple drools pdp flavors coexist. Issue-ID: POLICY-4403 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I81affeeec622e6c0e9627651bf34c0775a796827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-09-16Fix minor warnings in codeliamfallon1-1/+0
Issue-ID: POLICY-4045 Change-Id: I3ee1bce6f71c46a5b6ca819316b210a2a2ff8993 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-10restore coders toolset toStringjhh1-33/+41
This is to reduce verbosity introduced by lombok @ToString, Issue-ID: POLICY-3895 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7b6b3490b508e6ccb094da87d6f0f64a7e859277 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-02-09add policy_executions_latency_seconds summaryjhh1-5/+36
Issue-ID: POLICY-3761 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I9867472784d8f153b6955ce95b34de250f60f558
2021-09-20Additional tests for Telemetryjhh1-167/+104
Increasing coverage for drools to >= 80%. Issue-ID: POLICY-3453 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I9d8550a80b87b8c6f68da06246d392260eba1e65
2021-08-06Use slf4j Marker from common repoTaka Cho1-4/+4
using slf4j Marker from common repo Issue-ID: POLICY-3087 Change-Id: Iefbd6fa9ab2dfa6388508cb6ffd6cf1358b45ccc Signed-off-by: Taka Cho <takamune.cho@att.com>
2021-08-05Use lombok in drools-pdpJim Hahn9-40/+27
Updated policy-management thru policy-utils. Issue-ID: POLICY-3397 Change-Id: Ie9498fe912e8338ddc32a40774c3cb63d84f079a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-19remove TransMetric - not neededjhh3-11/+10
Issue-ID: POLICY-3033 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I626de45b528bb891c79900085bfe783fe248b3fa Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-12Merge "Fix sonars from dependency upgrade"Pamela Dragosh4-18/+14
2021-02-12Fix sonars from dependency upgradeJim Hahn4-18/+14
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner. Changed one to openMocks() because using the Runner caused it to fail on jenkins, but not in the local eclipse. Also fixed a type safety issue with EMPTY_LIST. Issue-ID: POLICY-2909 Change-Id: Iea9420190f208d7de3bf3ad531515c92e0fab83f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-11support transaction reports in enginejhh4-17/+171
Issue-ID: POLICY-3033 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id1f02c86be491d5145e74725f76953e294e2975c Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-01-14add methods to check if a fact exists.jhh3-2/+41
Issue-ID: POLICY-2762 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ic00d2a548dbc904e044d2310c7d5439a1cb708a5 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-09-30Fix new sonars in drools-pdpJim Hahn1-6/+8
Addressed the following sonar issues: - extract common test method - too many assertions in test method - don't always return the same value Issue-ID: POLICY-2616 Change-Id: Iab836cdcd667b35e2db9db7d6ffc7896df33e1c8 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-25Address more sonars in drools-pdpJim Hahn3-5/+5
Addressed the following sonars: - either log or rethrow - call "remove()" for thread-local-storage - use assertEquals - only one method call in exception test - swap arguments in assertEquals - add assertion to assertThatThrownBy() - explain @Ignore Also addressed eclipse warnings: - unused fields and methods Issue-ID: POLICY-2616 Change-Id: I6590c0d2b103885bc933014d48bf5fd92401cd80 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-24exit jvm when detecting configuration problemsjhh1-0/+37
It follows the same approach that in other policy components by throwing a runtime-exception vs System.exit(x). Issue-ID: POLICY-2752 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iba508fc7095b060373742849e394c8fdd2a2334f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-07-21Support multiple Policy/Controller types using 'controller.type' propertyStraubs, Ralph (rs8887)2-0/+158
It provides a feature base to allow for custom Policy and Drools Controllers. Issue-ID: POLICY-2415 Change-Id: Ibe3f11e3ecd925537ffd03d2420bb3b8214029c9 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com> Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-07-06Use apache TripleHAHN III1-46/+53
Replaced policy-utils/Triple with apache Triple. Issue-ID: POLICY-2694 Change-Id: I160f90c03f18b7da8dec5d0a00f809bcfb29680b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-02drools-pdp sonar fixTaka Cho2-5/+5
most of changes are assert statement Issue-ID: POLICY-2616 Change-Id: I3bd3076115d28d8cfabcbe0859cc4b21085e1394 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-19Address checkstyle version issues in drools-pdpJim Hahn1-3/+3
Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-19drools-pdp sonar issue fixesTaka Cho7-46/+46
fix all assert statements to comply with sonar issue Issue-ID: POLICY-2616 Change-Id: Ia36e3eab7c74d8dfb1ab3fa1395b1f64b173e09a Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-05-26Tests must specify serialization providerJim Hahn1-0/+6
When GSON is made the default serialization provider, several junits break. Modified them to specify the GsonJackson provider, which is what the REST classes use in production. Issue-ID: POLICY-1526 Change-Id: If1bcb955d7411cf747a14a0bf1dc069b02e2f2ea Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-07Address sonar issues in policy-managementJim Hahn10-34/+44
Addressed the following sonar issues: - modified code to specify the correct class name in the getLogger() call - use equals() instead of "==" for string comparison - remove deprecated code - use ',' instead of "," in indexOf - remove code that is commented out; typically bogus, so the comment was adjusted to satisfy sonar - missing assert in junits - use "{}" instead of concatenation when using logger - either log or rethrow - put arguments for assertEquals() in the correct order - remove "return" statements from the end of void methods - don't always return the same value; just disabled sonar as refactoring would have obfuscated the code - cognitive complexity; used eclipse auto-refactoring to extract out chunks of code into separate methods - don't pass array of classes to class.getDeclaredMethod(); use ellided arguments instead - fix argument count in logger calls - remove unnecessary casts - don't use "volatile" - make methods "synchronized" to match parent class definitions Issue-ID: POLICY-2305 Change-Id: Ie96418f696da4ae6c2ca8d4a914371469e695419 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-10policy routing and reorg into policy-domainsjhh1-52/+0
- Native Drools Controller Policy support. - Move domain policies into the policy-domains project. - Route legacy/compliant operational policies to one or all controller supporting the policy's policy type. - Enhancements to scripts to invoke commands external to the container. Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id41f04d10a28d2ea86bdd41334e499c28d0438ae Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-02http server/client managementjhh2-2/+147
This is to support the new actor architecture configuration. Issue-ID: POLICY-1625 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ieda56be38b8572d75a5fbb3775067ab537310aa1
2020-02-26Undeploy support for native rules PDP-D policies.jhh2-5/+5
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaaf5e13a5db286928952bcb3e4cc0f526b0b133c
2020-02-11Move model base classes outside feature-lifecyclejhh1-0/+52
So, it can be used in drools-application without a feature dependency. Issue-ID: POLICY-2360 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I1cf75bdd8739c35ea9b590896b177a519363e3d5
2020-01-13policy/drools-pdp jdk11 upgradesHockla, Ali (ah999m)11-32/+32
Issue-ID: POLICY-1589 Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2019-11-22Ocasional race condition in upgrade junitsjhh1-2/+2
Issue-ID: POLICY-2158 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I5b1295508a291338d0ea668f598ce038304a35bc
2019-11-14Invoke lock callback in session threadJim Hahn3-50/+101
Injects the callback as a DroolsRunnable into the session, if there is one. Otherwise, it invokes it via the engine's thread pool. Issue-ID: POLICY-2246 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I214480ae675d89e7335dde4eb4abe2684f7ef8ab Signed-off-by: Jim Hahn <jrh3@att.com>
2019-11-14Merge "Add 'DroolsRunnable' class"Jorge Hernandez1-3/+3
2019-11-14Add 'DroolsRunnable' classStraubs, Ralph (rs8887)1-3/+3
This provides a simple way to run arbitrary Java code within the Drools thread. This change also includes a general way to specify Drools rules that are automatically added to every Drools session. Change-Id: I5ddcca4c807dc552fbcbd4a19dce311a4d358279 Issue-ID: POLICY-1948 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
2019-11-12Dispose drools controllers in junit testsjhh1-9/+30
Issue-ID: POLICY-1407 Change-Id: I4db3489c242a6cdd39444de19c9c8da83559bee4 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-11-11Add drools factory clean up statements to junitsjhh3-144/+271
An attempt to tackle some intermittent junit errors experienced by team mates. Issue-ID: POLICY-1407 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I68a90dc50fe2fa5bfc7214aa26e2e5f78f1e6c23 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-11-08Miscellaneous code clean upjhh2-5/+4
Issue-ID: POLICY-2203 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I5731d4636bd2aaecbc486406298bcba1b19e8f4d Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-11-06Drools Controller upgrades Testsjhh3-33/+159
Issue-ID: POLICY-1407 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I6963fced5608b62a41b73fef5070c21cf45d6fbe Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-10-31Refactor duplicate code from lock managersJim Hahn3-96/+695
Change-Id: I8910a1a4267d824f064b52c6ad08945590bd9617 Issue-ID: POLICY-2203 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-29Cleanup eclipse warnings in drools-pdpJim Hahn1-1/+0
Issue-ID: POLICY-2203 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I3e854b1ea1986cd4992dc2ff84d799e970e443a9