aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-REST/src/test/java/org/onap/policy/rest
AgeCommit message (Collapse)AuthorFilesLines
2020-02-03policy/engine jdk11 junit and compilation error fixesHOCKLA1-1/+1
Issue-ID: POLICY-1590 Change-Id: I0bbc6f7310705c20924812efc5be2b0f91cf71a2 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-02Unit/SONAR/Checkstyle in ONAP-RESTliamfallon1-7/+205
Util package of ONAP-REST, with JUnit added and SONAR/Checkstyle issues addressed. Coverage increased from 51% to 73% in large PolicyValidation class. Issue-ID: POLICY-2131 Change-Id: Iffa90e2dfa155d3e9cac114032fb9ca0df2cbab0 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-28Unit/SONAR/Checkstyle in ONAP-RESTliamfallon1-0/+744
Util package of ONAP-REST, with JUnit added and SONAR/Checkstyle issues addressed. Coverage increased from 31% to 51% in large PolicyValidation class. Issue-ID: POLICY-2131 Change-Id: Ic88dd0d47bc9c09ed294ea62c37c683297b590c0 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-27Unit/SONAR/Checkstyle in ONAP-RESTliamfallon1-15/+263
Util package of ONAP-REST, with JUnit added and SONAR/Checkstyle issues addressed. Coverage increased from 18% to 31% in large PolicyValidation class. Issue-ID: POLICY-2131 Change-Id: Ie059db312918021683fe27cc2aaeed86b04046f2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-19Unit/SONAR/Checkstyle in ONAP-RESTliamfallon1-0/+422
Refactor of the PolicyValidationRequestWrapper class to make it testable and unit tests for the class. Issue-ID: POLICY-2131 Change-Id: Ie6b0b20aafd6a823fa778bb8070d057f27b28603 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-18Unit/SONAR/Checkstyle in ONAP-RESTliamfallon10-202/+494
Util package of ONAP-REST, with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: Ic134408efe76b9838f5607a07f1735d12bd41032 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-15Unit/SONAR/Checkstyle in ONAP-RESTliamfallon8-186/+269
Fifth and final batch of JPA pojos (Q-Z), with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: I1cc536a5b8a0cd3c6beff068dd72381f7ae10d12 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-13Unit/SONAR/Checkstyle in ONAP-RESTliamfallon17-402/+963
Fourth batch of JPA pojos (N-P), with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: I9319b514b5c19e6837c34566dde770673d16bca3 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-12JUnit/SONAR/Checkstyle in ONAP-RESTliamfallon4-74/+248
Third batch of JPA pojos (E-M), with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: I4fee1e9fb9c8a69dd6f2f15d3e3a8844473b857b Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-07JUnit/SONAR/Checkstyle in ONAP-RESTliamfallon4-44/+202
Second batch of JPA pojos (B-D), with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: I9466f27ffa606001209ed978be592ae95d1b32c4 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-06JUnit/SONAR/Checkstyle in ONAP-RESTliamfallon3-89/+161
First batch of JPA pojos Lombok'd and some missing coverage updated I'll be interested to see how Lomboking code shows up in SONAR, I have not added much JUnit here but I have reduced a good bit of source code, let's see what happens. Issue-ID: POLICY-2131 Change-Id: I8f270ef57282f63821c1eb94dd6b50f8ae541028 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-04JUnit/SONAR/Checkstyle in ONAP-RESTliamfallon1-320/+481
Cleanup of the dao-impl package in ONAP-REST All enclosing try/catch blocks removed. Issue-ID: POLICY-2131 Change-Id: Iec73fc5a85b891a00ba8c029e9904051c51284c2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01ONAP-REST DAO Sonar/Checkstyle clean and knock-onliamfallon1-26/+27
Clean up the ONAP-REST DAO package and also deal with knock-on chages in other packages. Issue-ID: POLICY-2131 Change-Id: I381d514d37ffbddb7a91b8f8a018c7354fc437b3 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-24CHeckstyle and JUnit for base package in ONAP-RESTliamfallon3-111/+342
Added unit tests and fixed checkstyle and SONAR issues in the base package of ONAPE-REST There was a lot of knock-on automatic changes done by Eclipse when I renamed the class XACMLRestProperties to XacmlRestProperties so ignore the changes in all but the ONAP-REST package. I also didn't update the licenses on files on those classes because the changes were automatic. Issue-ID: POLICY-2131 Change-Id: I28823c844b5192f8d56de76a727996b13e7ea4a6 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-23Consolidate PolicyRestAdapter setupPamela Dragosh1-3/+27
Put common code into PolicyEngineUtils that the controllers use to populate the PolicyRestController. Also some more sonar cleanup and formatting of XML files. Shortened 120 line characters. Removed some trailing spaces from comments. Fixed up one JUnit. Licenses. Issue-ID: POLICY-2133 Change-Id: Id7d8ac3ab60331535f048ec0f26aeb17a099414e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-19Improved tests performanceKrysiak Adam1-15/+34
* used mock instead of waiting till dmaap client fails * creating in memory DB only once Issue-ID: POLICY-1671 Change-Id: Ia1b6ce7ddad1bce0d17c2dbf14f3d82dd237673b Signed-off-by: Krysiak Adam <adam.krysiak@nokia.com>
2019-04-08CLAMP Model policy creation supportuj426b3-39/+114
Change-Id: Ia69f061c078e4f6ed4b4d2cd12f03f58514f2123 Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com>
2019-04-04Auditing User Operations Push or Delete Policies.uj426b1-0/+45
Change-Id: I39d5fc01e68e9d711c5dd09790dc34beb68783c3 Issue-ID: POLICY-1421 Signed-off-by: uj426b <uj426b@att.com>
2018-07-31Convert tabs to spaces basic refactoringKrishnajinka23-2787/+2787
Change tabs into spaces for checkstyle fixes in ONAP REST module of policy engine. These changes come in way for review. Hence doing them before refactoring is better. Issue-ID: POLICY-1014 Change-Id: I31a372ae527946927157bc23b576f3066679b0ae Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-24Decision BlackList Guard Enhancementsrb71471-0/+41
While creating a decision Bl Guard Policy we are allowing to add Blacklist entries through file upload for bulk from GUI. Issue-ID: POLICY-901 Change-Id: I4031fd4a96937b9facc330cecf72777d701d4678 Signed-off-by: rb7147 <rb7147@att.com>
2018-05-23Fix Issues in TOSCA ParserWang,Frank(gw1218)1-0/+2
Fixed a bug and added some new validations in TOSCA Parser Issue-ID: POLICY-776 Change-Id: I2dc1b5b38cd137efc5c24ccf55b19de9f47c44da Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-05-01Fix Test fail with variable length memory addressliamfallon1-1/+2
The unit test class PIPConfigurationTest.java has a test that checks a configuration string for length. However, the length of the "piptype" field in that string can vary, causing the test to intermittently fail. Field that passes: piptype=org.onap.policy.rest.jpa.PIPType@71b3bc45 Field that fails: piptype=org.onap.policy.rest.jpa.PIPType@a8c1f44 This fix removes the memory address from the "piptype" field, so that the configuration string will now always be 323 characters in length. Change-Id: Ib3640ec6f69ac7d691dcc989c44a7822bcc9b7f7 Issue-ID: POLICY-765 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-04-02Support CSIT tests for OOF PolicyMichael Mokry1-2/+85
I added an INSERT to the sql upgrade file and some sonar fixes and Junits Change-Id: I37139d5a8ad78d9d46ee01f81c2edd052672712e Issue-ID: POLICY-639 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-29JUnit additions for ONAP-RESTbobbymander4-0/+311
Issue-ID: POLICY-603 Change-Id: Ic8a20fc758927afb9200547d5919fcf70f15852b Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-26New Optimization PolicyMichael Mokry1-0/+71
This is the new Optimization Policy to support the Integration of the OOF Policy Model into the Policy Platform. Added changes from Frank Wang to fix the following issues with existing Model Parser: 1. TOSCA Rendering issues 2. Matching Attributes support 3. ImportModelAPI to support TOSCA model upload via REST API Running local Sonar tonight to start fixing Sonar issues Added changes per review comments and fixed Sonar issues Change-Id: Ia8ce09c28a718ce4460475e76a750caef774bd6b Issue-ID: POLICY-622 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-23JUnit additions for PAP-REST,RESTbobbymander3-0/+151
Issue-ID: POLICY-603 Change-Id: Id7d2c1a835d028e88337db67d55f139aa1764826 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-21JUnit additions for PDP-REST,REST,SDK-APPbobbymander1-5/+5
Issue-ID: POLICY-584 Change-Id: I3b16e2a957e67ecfe5c28d2afaa09771ae891216 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-21JUnit additions for PAP-REST,REST,Utilsbobbymander2-59/+160
Issue-ID: POLICY-600 Change-Id: I9a432f9e8af43184d116d5eeb2fbbac65472564e Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-13Fixed the SDK Junits and cleaned unused coderb71471-11/+0
Moved file tmp object from try resources block. due to not closing the stream the inputstream read by xacmlpolicyscanner ended with premature file error. Cleaned unused code. Issue-ID: POLICY-584 Change-Id: I92c4d000d94a144736d9ac46db384785a7512593 Signed-off-by: rb7147 <rb7147@att.com>
2018-03-01JUnit additions for PAP-REST,REST,XACMLbobbymander2-1/+24
Issue-ID: POLICY-603 Change-Id: I78c5e302c474613cbb22a80e0d931b4f47dd3b63 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-02-27JUnit additions for XACML,REST,POLICY-SDKbobbymander1-0/+32
Issue-ID: POLICY-584 Change-Id: I4bb91b18122c7f61bb71b1a9e39d51cd65af70bd Signed-off-by: bobbymander <bobby.mander@att.com>
2018-02-26JUnit additions for BRMS,PDP-REST,RESTbobbymander1-1/+7
Issue-ID: POLICY-598 Change-Id: I397ed925bdb43a4b2f7a94cc4692b6506f650ede Signed-off-by: bobbymander <bobby.mander@att.com>
2018-02-20Added Junits for Policy PAP-RESTrb71471-0/+91
Clenaed the unsued code. Cleaned the duplication of code and moved to ONAP-REST. Added Junits for PAP-REST Issue-ID: POLICY-600 Change-Id: I56e6e8f2f547def9eaf8624a9e0dd52dc05ad136 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-16Added Junis for Policy ONAP-RESTrb714713-68/+619
Cleaned the unused constructors. Cleaned the unused code. Added Junits for all JPAS. Renamed the Junit class names on removing classes. Issue-ID: POLICY-603 Change-Id: I0709ccecd7a2f3ec49367ff85f5a6d273479493e Signed-off-by: rb7147 <rb7147@att.com>
2018-02-13Added Junits for Policy PAP-RESTrb71478-3/+1261
Cleaned the unnecessary constructors and methods in onap-rest. Added Junits for JPA Classes in ONAP-REST. Issue-ID: POLICY-338 Change-Id: I7e4f928342315475db96d89e9ad3adac5cb7eb00 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-12Added Junits for Policy PAP-RESTrb71471-0/+160
Resolved the sonar issues. Added JUnits for ONAP-PAP-REST and ONAP-REST Component. Issue-ID: POLICY-338 Change-Id: Ibec2613f4f61e9ed426583af17c2a9d5b8c8d85d Signed-off-by: rb7147 <rb7147@att.com>
2018-02-09Added JUNITS for ONAP-REST Componentrb71476-20/+762
Added JUnits for all Pojo classes. Issue-ID: POLICY-338 Change-Id: I0142903899f0793a8e147a01aeea83d467e49981 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-08MS Model Input ValidationMichael Mokry1-0/+80
- Provides validation for MS policy input content body that matches the GUI validations when create/update MS policy from API - Added changes to satisfy review comments and updated copywright headers for modified and new files Change-Id: I02bfa639bffb48520badd0e4fa34eb36418547ae Issue-ID: POLICY-377 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-02-01Included Policy GUI Enhancements and validationsrb71471-0/+50
Added hover messages for all policy templates. Resolved few sonar issues. Added fixes for Policy GUI Validations. Issue-ID: POLICY-597 Change-Id: I74abb92dd6ac8722d7869b6a316fad1d8db11d9c Signed-off-by: rb7147 <rb7147@att.com>
2017-12-11Adding SONAR fixes forMichael Mokry1-0/+441
- pushPolicy defect fixes for POLICY-486 - Common Policy Validation feature for POLIYC-449 Change-Id: I8d54aa5a9b819c6eb4427dfa47c4ce963a21c2e0 Issue-ID: POLICY-449,POLICY-486 Signed-off-by: Michael Mokry <mm117s@att.com>
2017-07-31[POLICY-73] replace openecomp for policy-engineGuo Ruijing1-0/+107
Change-Id: I54072f6bcd388c0e05562614ee89b4ae7ad67004 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>