aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/test
AgeCommit message (Collapse)AuthorFilesLines
2019-11-18Merge "Unit/SONAR/Checkstyle in ONAP-REST"Liam Fallon2-9/+9
2019-11-15More JUnit additions for PAP-RESTbobbymander4-19/+93
Issue-ID: POLICY-2130 Change-Id: Ia111e5fd6dfba1e03f157ff95f91ef65df293043 Signed-off-by: bobbymander <bobby.mander@att.com>
2019-11-15Unit/SONAR/Checkstyle in ONAP-RESTliamfallon2-9/+9
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-15Merge "Unit/SONAR/Checkstyle in ONAP-REST"Pamela Dragosh7-51/+51
2019-11-13Unit/SONAR/Checkstyle in ONAP-RESTliamfallon7-51/+51
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-13Few JUnit additions for PAP-RESTbobbymander5-28/+223
Issue-ID: POLICY-2130 Change-Id: Ie9972bc0014def93acf04c4a2386585fb4accdef Signed-off-by: bobbymander <bobby.mander@att.com>
2019-11-12JUnit/SONAR/Checkstyle in ONAP-RESTliamfallon2-16/+16
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-RESTliamfallon3-10/+10
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-05More JUnit additions for PAP-RESTbobbymander4-2/+202
Issue-ID: POLICY-2130 Change-Id: Ia64bdbb377d26ba209b2d3fc51bc95f5769a7729 Signed-off-by: bobbymander <bobby.mander@att.com>
2019-11-01ONAP-REST DAO Sonar/Checkstyle clean and knock-onliamfallon3-49/+52
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-30JUnit additions for PAP-REST, checkstyle fixesbobbymander4-60/+156
Issue-ID: POLICY-2130 Change-Id: Ia9fb294090a27ee86321249bc6b1cbdf20f33d06 Signed-off-by: bobbymander <bobby.mander@att.com>
2019-10-29Merge "CHeckstyle and JUnit for base package in ONAP-REST"Liam Fallon2-14/+14
2019-10-25junit addition and update for PAP.bobbymander2-66/+73
Issue-ID: POLICY-2130 Change-Id: I33f25588c34fe72b12855a2486ba892afc04693c Signed-off-by: bobbymander <bobby.mander@att.com>
2019-10-24CHeckstyle and JUnit for base package in ONAP-RESTliamfallon2-14/+14
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 Dragosh48-1323/+1581
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-10-22Remove useless imports and varsPamela Dragosh6-20/+7
Some formatting and javadoc cleanup also. Issue-ID: POLICY-2133 Change-Id: Icb0f76c7e69df87918b4bc5a02a013f9d2bfae89 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-18JUnit addition for PAP-RESTbobbymander1-0/+74
Issue-ID: POLICY-2130 Change-Id: I8b35a83b3eeb2760a99c3893604afba1bc5eafd7 Signed-off-by: bobbymander <bobby.mander@att.com>
2019-10-16Adding simple, missing junitbobbymander1-0/+37
Issue-ID: POLICY-2130 Change-Id: I6bc88b7bf720e672bfaa97029453e8d39a706aae Signed-off-by: bobbymander <bobby.mander@att.com>
2019-07-08Fix policy/engine due to sonar changes in commonJim Hahn2-4/+4
Fixed breakages due to changes made in policy/common to satisfy sonar. Change-Id: I88090c7549ba19f9eb45fae311e8811e39f30318 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-01Merge "Adding logging to JUnit"1.5.0Jim Hahn2-3/+65
2019-07-01Fix centos build issueJim Hahn1-0/+16
Seeing this when trying to build in centos: 10:04:12 [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.459 s - in org.onap.policy.pap.ia.DbAuditCompareEntriesTest 10:04:12 [INFO] 10:04:12 [INFO] Results: 10:04:12 [INFO] 10:04:12 [ERROR] Failures: 10:04:12 [ERROR] XACMLPAPTest.testDummy:907 10:04:12 [ERROR] Errors: 10:04:12 [ERROR] XACMLPAPTest.getDictionary:886 ยป NullPointer ... Modified the junit test(s) to create the JPA entities needed by integrity audit, which is what was causing the above issues. Change-Id: I405798a1946d377770529a99210a1cc57390667f Issue-ID: POLICY-1737 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-28Adding logging to JUnitPamela Dragosh2-3/+65
Turning on logging. Issue-ID: POLICY-1876 Change-Id: I82b04609a07f5d33c88c3e0068959de1e628cb38 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-30Fix test files created during executionpa834y2-163/+121
Change-Id: Idaeaabfb523ca9206077827895c695a122f62101 Issue-ID: POLICY-1706 Signed-off-by: pa834y <pa834y@att.com>
2019-04-10Merge "New junits and bug fixes"Pamela Dragosh3-5/+593
2019-04-09New junits and bug fixespa834y3-5/+593
Change-Id: I1716af52ca6cdde93eef1a37f4a32a9f6f3e12f0 Issue-ID: POLICY-1417 Signed-off-by: pa834y <pa834y@att.com>
2019-04-08CLAMP Model policy creation supportuj426b1-99/+170
Change-Id: Ia69f061c078e4f6ed4b4d2cd12f03f58514f2123 Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com>
2019-04-02Merge "Push and unpush to support multiple policies"Jorge Hernandez2-8/+8
2019-04-02Push and unpush to support multiple policiespa834y2-8/+8
Change-Id: I95a05898d299a96810abf4f3b7940e8a3a243000 Issue-ID: POLICY-1414 Signed-off-by: pa834y <pa834y@att.com>
2019-03-27Fix sonar new bugs and vulnerabilitiespa834y2-8/+7
Change-Id: I7fbfe70e856d48f40ad831a6d0451e46024bf6de Issue-ID: POLICY-1417 Signed-off-by: pa834y <pa834y@att.com>
2019-03-20use hibernate and breakup dbdao and papservletpa834y7-798/+685
Change-Id: Ifa655d56bda0ab4c748f188767122e7bd927155b Issue-ID: POLICY-1417 Signed-off-by: pa834y <pa834y@att.com>
2019-02-14Reformat ONAP-PAP-REST test caseskaihlavi8-407/+497
Reformat test cases to follow ONAP style https://wiki.onap.org/display/DW/Java+code+style Format changes mainly consist of conversions of 2 spaces to 4 spaces Samsung modification copyrights added Issue-ID: POLICY-1506 Change-Id: If67e440bea6d8d10a971a551aac8484f22d2ecca Signed-off-by: kaihlavi <l.kaihlavirt@partner.samsung.com>
2019-01-22Increase JUnit Code Coverage for PolicyDBDaoMichael Mokry1-1/+42
Added Junit tests for PolicyDBDao methods that were not covered after observing that the code coverage dropped below 50% in SONAR. Modified license headers with correct copywrite Change-Id: Iad8e18d978236f4391363d963eb4624744f45099 Issue-ID: POLICY-1448 Signed-off-by: Michael Mokry <michael.mokry@att.com>
2019-01-11Fix policy/engine after integrity-audit changesJim Hahn1-8/+8
In POLICY-1133, some classes in integrity-audit were modified (i.e., DbDAO => DbDao). Policy/engine uses those classes, too, so it must also be updated to reflect. Change-Id: I01ebad1ddfe8f1bb490c56b2eb3336c691688a24 Issue-ID: POLICY-1133 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-11New min/max Guard PolicyMichael Mokry1-0/+37
Made changes to support Guard policy create/update and other policy manager functions including deletePolicy and pushPolicy. Includes changes for new Guard policy support using GUI and API (Rest and Java Client) Made changes to address Jim's comments Made changes to address Liam's comments Change-Id: I133fe1fd9287ea77ea41a2788de90c7642c36b6a Issue-ID: POLICY-1038 Signed-off-by: Mike Mokry <mm117s@att.com>
2018-09-05XACML Platform Enhancementsrb71471-0/+1
To Support Raw Policy Creation from GUI and API. GetDecision on combining algorithim with Policy Set. Issue-ID: POLICY-902 Change-Id: Ie3189f8ded2e03366bc7d65d15b95b88c89b0acd Signed-off-by: rb7147 <rb7147@att.com>
2018-08-20Use builder for std pap policyKrishnajinka1-9/+39
Modify constructor in stdpappolicy to use builder this will fix the sonar issue related with more than 7 parameters method parameters Issue-ID: POLICY-1016 Change-Id: Id736a66e5ea48f0f233cffb640cdce8aaa8f2c0d Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-08-14Optimize PAP policy constructor with builderKrishnajinka1-9/+32
Fix sonar issue about constructor using more than 7 params. Use builder parameters object for setting the attributes of std pap policy.Recommit1 Issue-ID: POLICY-1016 Change-Id: Id9631a42813960baa78df4ab0c0f6706244c3180 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-08-13Modify std pap policy to use builder in constrKrishnajinka1-7/+32
Fix sonar issue about constructor using more than 7 params. Use builder parameters object for setting the attributes of std pap policy.Rework2 Issue-ID: POLICY-1016 Change-Id: If26f7daa8d5b5d387238aad74daeddd49a8b95bb Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-08-10Add PAP Policy parameter builder xacml policykrishnajinka1-105/+195
Fix Sonar flagged major issue about 14 params instead of 9 in the constructor of std pap policy class. Commit5 for modify constrctor.fix test Issue-ID: POLICY-1016 Change-Id: I79c8482b7fc4e203cb18402ba2b5a68a120c57b1 Signed-off-by: krisjinka <kris.jinka@samsung.com>
2018-08-03Modify ONAP PAP REST classes basic checkstyleKrishnajinka42-5869/+5869
Modify tabs to space for checkstyle issue fix in ONAP PAP REST module. It helps future reviews and refactoring. Remaining classes Issue-ID: POLICY-1014 Change-Id: I677eadac9e8364b388be922024528c27fd1e2545 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-06-20Change PrefixList.class to Zone.classJim Hahn1-624/+427
Changed the class. Modified the junit test to catch that type of issue, refactoring it to extract common code. Change-Id: Ibc3d22821f103cd3954d2f2f54d4d62307dbf4c6 Issue-ID: POLICY-909 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-05-07fix PE DB lock timeout problemsJorge Hernandez1-1/+1
see companion docker review. The failOverReadOnly .. flags should only be used when a DB high availability environment is used, such as a master/slave configuration. As they are the jdbc parameters have caused bad interactions with the underlying persistence libraries rendering the PAP useless. It is thought that this may perhaps solve POLICY-773, POLICY-775, POLICY-779, and perhaps POLICY-776. Change-Id: Icb69a3afc0a19969a34af40d960fa8e1b94aabc0 Issue-ID: POLICY-777 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-19Add license to policy-engine filesJim Hahn5-0/+98
Added license to various files. Updated XACMLPolicyScanner to work even when license comment is added to the Policy.xml file. Moved DOCTYPE before license in html files. Removed license from css files, as many are generated or come from third-party software. Removed license from other generated files. Change-Id: I9d98ca9f552a6eae17e80ef27fc7045cc4f27b8e Issue-ID: POLICY-741 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-03-30JUnit additions for XACML,PAP-RESTbobbymander1-26/+38
Issue-ID: POLICY-605 Change-Id: I4b55a85eacf989ddb55743300e7f75e4b72882d0 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-26New Optimization PolicyMichael Mokry6-7/+380
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-25Merge "JUnit additions for PAP-REST,REST"Pamela Dragosh2-15/+62
2018-03-23JUnit additions for PAP-REST,RESTbobbymander2-15/+62
Issue-ID: POLICY-603 Change-Id: Id7d2c1a835d028e88337db67d55f139aa1764826 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-22Add database initialization to XACML PDP testliamfallon1-1/+50
This issue arose due to the order of execution of JUnit tests. The tests in XACMLPAPTest failed becasue the database was not initialized. Up till now, the @Before method in the test class org.onap.policy.pap.ia.DbAuditCompareEntriesTesti initiated the database. THis bug fix adds a similar @Before method to the XACMLPAPTest class to initialize the database. All other classes in the module were tested with both @Before methods commented out to ensure that no other tests will fail due to this issue. Issue-ID: POLICY-707 Change-Id: Ibce5fad5c006f7a92b3ef77bde4dc5ed6f7039ed Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-21JUnit additions for PAP-REST,REST,Utilsbobbymander1-0/+51
Issue-ID: POLICY-600 Change-Id: I9a432f9e8af43184d116d5eeb2fbbac65472564e Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-13JUnit additions for PAP-REST,SDK-APPbobbymander1-0/+37
Issue-ID: POLICY-600 Change-Id: Ie2a3257e26382f68d8cb008dc5ac512d6ac49c8b Signed-off-by: bobbymander <bobby.mander@att.com>