aboutsummaryrefslogtreecommitdiffstats
path: root/policy-executor-stub/src
AgeCommit message (Collapse)AuthorFilesLines
2024-10-24Add multi-threaded Integration Test for Module SyncToineSiebelink1-2/+2
- Add tests for multi threaded scenarios around module sync - Disabled ModuleSyncWatchdog timer using long delay and interval - Call Module Sync method as needed for more control (sometimes it needs to be triggered twice like retry use cases as designed) - Improve NCMP performance test setup (consistent naming etc.) - Rename some production code method names to better reflect functionality - Disabled intermittent failing test for create cm handle as it is not asserting the correct message - Improved Code Coverage ModuleSyncWatchdog Issue-ID: CPS-2462 Change-Id: Ia907af77d2037309f1bbb73ea671679b788bab9e Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-10-03Policy Executor: handle errors, part 2ToineSiebelink3-1/+67
(fighting between IntelliJ and Checkstyle best practices) - non-2xx responses are processed using web client exceptions - handle unknown host exception - upgraded spotbugs (checkstyle and related mvn plugin) - fixed some small spotbugs due to upgrade - added commented instructions in docker compose to enable debugging - added some environment variables for policy executor configuration - extract out Sleeper in stub service to achieve 100% coverage - added cause to Policy Executor exceptions where applicable - ignored (new) spotbug rule about catch NPE because of issue in 3pp - ignored (new) spotbug rule about \n in string due to multiline string block Issue-ID: CPS-2412 Change-Id: I6835a73320c436cbeea12cc7a06f15899eec7bf1 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-09-17Policy Executor API: Add Prefix in YamlToineSiebelink3-22/+13
- Remove servers from yaml. - Add prefix to path in yaml. - Remove basepath prefix from Controller Impl. - Added policy server port to 8093. - Exposed docker env. vars for policy services. Issue-ID: CPS-2291 Change-Id: Idcc9e23f9d63bad2480537dc8d39523fe82b4b83 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-07-31Refactor OpenAPI Policy ExecutorToineSiebelink2-39/+90
- replace payload with request(s) - replace payloadType with schema (one schema for each operation) - include conflict error response in OpenAPI - introduce 4 schemas in NCMP (doc module) for create, update, patch & delete - udpate stub & test to follow new API and use one schema for testign purposes Issue-ID: CPS-2335 Change-Id: Ifc40062ae83429a9ffba350ec3bcc28cb7147293 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-07-10Policy Executor API, make Authorization header optionalToineSiebelink2-10/+14
Issue-ID: CPS-22291 Change-Id: I2b8f9b97c92dfc640c8b40b7053c609bbdcb2f6e Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-07-08Create PolicyExecutor StubToineSiebelink5-0/+292
- Generate interface from OpenApi in RTD docs - Fixed Content Type in OpenAPI - Fixed Paths in OpenAPI - Made Authorization header compulsory in OpenAPI - All 'enum' values in OpenAPI lowercase (in linr with CPS/NCMP conventions) - Added impl with some basic functionality - Added testware - Pom includes docker image creation - Docker compose updated to deploy stub Issue-ID: CPS-2301 Change-Id: I462ad5c70474b2813fc04005c0d20a1b15b574ec Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>