summaryrefslogtreecommitdiffstats
path: root/controlloop/common/rules-test/src
AgeCommit message (Collapse)AuthorFilesLines
2023-09-22Upgrade Java 17 in policy-drools-appsadheli.tavares15-363/+297
Issue-ID: POLICY-4816 Change-Id: I61d5c2c0b8bf2cc08416d91bbd84f27f2ed5c5c1 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-01-31Upgrade and clean up dependenciesliamfallon4-29/+34
- 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: I8f3eeba7bd476c2b8e74a6a6a9d1f53b4c5304c3 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-11-14rename a1 policy example to putA1Policyjhh1-1/+1
Issue-ID: POLICY-4444 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I830d11233416f770177e103ae62fbb2b863d7aed Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-11-04Support A1 PMS Actor for SON use casejhh2-9/+17
Issue-ID: POLICY-4444 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I1811b79513616aab813b6d97823d6c1d2bbbee47 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-10-31Support usage for SON policy/models templates.jhh1-1/+11
Issue-ID: POLICY-4427 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I22706cdbd45c49946435aff15bc5ec5f7408296b
2022-09-21Merge "Fix minor warnings in code"Liam Fallon1-2/+0
2022-09-16Fix minor warnings in codeliamfallon1-2/+0
Issue-ID: POLICY-4045 Change-Id: I3587a3b77ff5860a84a88d4d390238e3654693b7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-09-125G SON usecase A1 O1 policies supportjhh6-12/+128
Issue-ID: POLICY-4108 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I3e740f108dad18f78dc69ebed1949674c58ff95b
2021-08-09refactor to use common.utils.loggingTaka Cho1-5/+5
using utils.logging from common repo Issue-ID: POLICY-3087 Change-Id: I60fb7eb47e38ae776f1d23926b551667c555700a Signed-off-by: Taka Cho <takamune.cho@att.com>
2021-06-18Fix new checkstyle issues in drools-appsJim Hahn1-4/+0
The new version of checkstyle identified new issues. Fixed those. Issue-ID: POLICY-3290 Change-Id: I26a14fb6f0823f9836bc5b62222e4e2cb01977ae Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-17Use lombok in drools-appsJim Hahn3-25/+2
Issue-ID: POLICY-3398 Change-Id: I2afedc900bc268dc83f689624b4daabdb64a09f9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Fix sonars in drools-appsJim Hahn4-16/+15
Fixed: - use "var" - add @Override annotation - change constructor to "protected" - use Xxx.class::isIstance Issue-ID: POLICY-3290 Change-Id: I7f0795af306ea5afb46d12a4fe0b22adcbce683a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-08Minor clean-up of drools-appsJim Hahn1-0/+32
Made the following minor changes: - removed SupportUtil, as it is no longer needed. - modified junit for exception class to use ExceptionsTester - added junit for another exception class Issue-ID: POLICY-3175 Change-Id: I7375e5bdb47a12f48a53e7df50f0924781c1c4b6 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-12Fix sonars from dependency upgradeJim Hahn7-57/+29
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner. Issue-ID: POLICY-2910 Change-Id: I257b74626f4393aa89d2bf1b7502478422213b71 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-04Changed identifiers to concept identifiersliamfallon2-5/+7
The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: Id5da4e5894a0d646f9f4b68c1e6b0476d4deae05 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-11-16Make drools-apps event agnosticJim Hahn3-6/+6
Removed tdjam and frankfurt controllers, which use event-specific actors. Issue-ID: POLICY-2804 Change-Id: Ica05f80bf72d039d9c4903591af7fb3793a81159 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-30Fix new sonars in drools-appsJim Hahn2-4/+9
Addressed the following sonars: - too many assertions in test method - rename test class - use static method to modify static field - use already defined constant - code always returns the same value - use assertNotSame - use appropriate class name to access static method - define a constant - extract nested try block - don't always return the same value - use remove() instead of set(null) for thread-local-storage - add @Override Issue-ID: POLICY-2852 Change-Id: Icc62acd4ad57afa2d44ed4cdca504a3ac0810228 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-14Release locks between junit testsJim Hahn1-9/+59
Tdjam junits were randomly failing. Traced it down to the fact that the locks were being released asynchronously and thus were not always released when the next test cases requested them. Also simplified logging for tdjam junit tests. Fixed the property file so it isn't overwritten by the junit tests. Changes per review comments: - changed "Pattern" to "pattern" in logback xml Issue-ID: POLICY-2789 Change-Id: I325ec69cf7affa531d3c575e3a34bc0b0e1edac7 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-03Merge "update the toscapolicy in ruletest set"Ram Krishna Verma2-2/+2
2020-09-02Add guard filter properties to controllerPamela Dragosh1-1/+1
Adding new properties to guard Decision call. Issue-ID: POLICY-2590 Change-Id: Ie4a37990e062c76ac4d6dd1b904ad354736fd27a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-09-02update the toscapolicy in ruletest setTaka Cho2-2/+2
modelVersion has to be a string instead an integer Issue-ID: POLICY-2814 Change-Id: I31c89d69f96076d490c665f4912d25e3892d011a Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-08-28Merge "Use ToscaPolicy instead of legacy Policy"Pamela Dragosh1-1/+0
2020-08-27Use ToscaPolicy instead of legacy PolicyJim Hahn1-1/+0
Removed usage of policy-yaml and old targetType definition. Switched to using TOSCA operational policy classes and new definitions for Target type enum. Issue-ID: POLICY-2428 Change-Id: I25d1c5219764df27bdae7f2cbeb7ada7bcef4e1e Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-08-26Move java code to rulesJim Hahn1-1/+1
Added new usecases rules and feature. Updates per review comments: - kmodule.xml(s) Issue-ID: POLICY-2748 Change-Id: I2f5cb05a4269f98a3b0a778730434955f0919b4a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-21remove legacy operational policies supportjhh1-2/+1
Issue-ID: POLICY-2765 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I454365943465863b108ba8668b2bc4b201986959
2020-08-14Remove legacy operational policy from drools-appsJim Hahn9-136/+4
Issue-ID: POLICY-2766 Change-Id: I1ff7bbc4e301cfe6fa746f38c839acf83f7584b6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-11Refactor BaseRuleTest for Drools appsTaka Cho5-138/+498
1, rename BaseRuleTest to BaseTest. 2, remove drools related code in BaseTest that would use for tdjam controller. 3, DroolsRuleTest extends BaseTest that would use for frankfurt controller for drools base. Issue-ID: POLICY-2750 Change-Id: Ica9637a850de6e929f09532f077ae3e997aa2045 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-07-20Support vDNS RainyDay test Case.uj426b3-0/+105
Change-Id: I6d2b17c5379b19b04589da4d7bc4a7f6ebc4d23a Issue-ID: POLICY-2432 Signed-off-by: uj426b <uj426b@att.com>
2020-07-14Remove usecases and legacy actor codeJim Hahn1-9/+0
Made the following changes to remove usescase and legacy actor code: - deleted the usecases controller and feature - deleted code associated with legacy actors, with the exception of AaiManager, which is needed by RestControlLoopManager - moved the contents of the "guard" project into the m2/guard project, as that is the only thing that still needs it - modified the m2/GuardContext to get the name of its persistence unit from the properties so it could be overridden by junit tests - used eclipselink constants Also fixed a bug in the properties for the VFC actor. Addressed review comment: - removed usecases from Dockerfile Issue-ID: POLICY-2558 Change-Id: I677d68c9efed9247c3d55773abdcc736b577a6b4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-19Changes for checkstyle 8.32Jim Hahn1-1/+1
Issue-ID: POLICY-2188 Change-Id: Ib90222c537c5440e0de52fa0acbaa99bbcc4772a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-13Handle duplicate events in drools-appsJim Hahn3-14/+21
Modified the frankfurt rules to compare the event objects instead of comparing the request ID when determining if an event is new. The event object's equals() method ignores the request ID when doing the comparison, thus it will treat an event as a duplicate even if the request ID is different, which is the behavior we want. Also removed the @Ignore from the junit that tests for duplicate events in the hope that this change will fix it. If the docker build still breaks, then @Ignore can be added back in. Issue-ID: POLICY-2557 Change-Id: If2b9fd26473d78a356218b951bfe160f93daeb32 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-10Added vpci and vsonh testspramod.jamkhedkar10-0/+346
Added test cases for vpci and vsonh usecases Issue-ID: POLICY-2162 Change-Id: Ia69b16e74b82b92366b5065eeccab8d35f647742 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2020-03-25Add @Ignore to test that is failing during docker buildPeyton Puckett1-0/+4
Issue-ID: POLICY-2378 Change-Id: I7b466a3846b99cd8630d793139799a6885688748 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-03-23Remove vLB from drools-appsJim Hahn5-103/+21
Added a test for legacy policy to vDNS. Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I92fc7813067d3e98562e5d1c7f0da7afe5aac96d
2020-03-20Merge "Last sonar fix for drools-apps"Liam Fallon1-0/+5
2020-03-19Last sonar fix for drools-appsJim Hahn1-0/+5
Remaining issues will be examined/addressed in Guilin. Issue-ID: POLICY-2426 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I2354122ed40e27de472a346001aff4e46d27ccf6
2020-03-18Add rainyDayTest for VFWPeyton Puckett7-4/+233
Added less restrictive filter condition to consider discarded messages Issue-ID: POLICY-2431 Change-Id: I0bc5e34636699094c97bd7e5669f66df875cd6ae Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-03-17More sonar fixes in drools-appsJim Hahn5-27/+167
Issue-ID: POLICY-2426 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Idfdcb229d05ee7f0220f44f8099284caaed754d4
2020-03-12Retool rules testsJim Hahn52-0/+4130
Extracted common code from various XxxBaseTest classes into: - Topics class to manage messages for test topics - HttpClients class to manage HttpClient objects for tests - Simulators class to manage simulators for tests - Rules class to manage start up and shutdown of rules Merged remaining code from XxxBaseTest classes into a single class. Modified the Frankfurt and Usescases tests to subclass from this new class and specify just the relevant tests to be executed. Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iaf83c9d2b205a4c343e0dde23ec86508f5773693