From 14d66fcf742b8a15867ac0b9b82176b0958f0ae6 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 17 Jul 2019 09:43:08 -0400 Subject: Modify policy/api to use RestServer from common This also entailed removing the local copy of RestServerParameters. Change-Id: Ie5c581ab70aee60844d1660fe0a61290de6470ec Issue-ID: POLICY-1652 Signed-off-by: Jim Hahn --- .../expectedValidationResults/InvalidRestServerParameters.txt | 10 +++++----- main/src/test/resources/parameters/RestServerParameters.json | 6 ++++++ .../test/resources/parameters/RestServerParametersEmpty.json | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 main/src/test/resources/parameters/RestServerParameters.json create mode 100644 main/src/test/resources/parameters/RestServerParametersEmpty.json (limited to 'main/src/test/resources') diff --git a/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt b/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt index 2ab9c1b4..eca803ea 100644 --- a/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt +++ b/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt @@ -1,7 +1,7 @@ validation error(s) on parameters from "parameters/ApiConfigParameters_InvalidRestServerParameters.json" parameter group "ApiGroup" type "org.onap.policy.api.main.parameters.ApiParameterGroup" INVALID, parameter group has status INVALID - parameter group "null" type "org.onap.policy.api.main.parameters.RestServerParameters" INVALID, parameter group has status INVALID - field "host" type "java.lang.String" value "" INVALID, must be a non-blank string containing hostname/ipaddress of the api rest server - field "port" type "int" value "-1" INVALID, must be a positive integer containing port of the api rest server - field "userName" type "java.lang.String" value "" INVALID, must be a non-blank string containing userName for api rest server credentials - field "password" type "java.lang.String" value "" INVALID, must be a non-blank string containing password for api rest server credentials + parameter group "RestServerParameters" type "org.onap.policy.common.endpoints.parameters.RestServerParameters" INVALID, parameter group has status INVALID + field "host" type "java.lang.String" value "" INVALID, must be a non-blank string + field "port" type "int" value "-1" INVALID, must be >= 1 + field "userName" type "java.lang.String" value "" INVALID, must be a non-blank string + field "password" type "java.lang.String" value "" INVALID, must be a non-blank string \ No newline at end of file diff --git a/main/src/test/resources/parameters/RestServerParameters.json b/main/src/test/resources/parameters/RestServerParameters.json new file mode 100644 index 00000000..86aee276 --- /dev/null +++ b/main/src/test/resources/parameters/RestServerParameters.json @@ -0,0 +1,6 @@ +{ + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34" +} diff --git a/main/src/test/resources/parameters/RestServerParametersEmpty.json b/main/src/test/resources/parameters/RestServerParametersEmpty.json new file mode 100644 index 00000000..e02aef27 --- /dev/null +++ b/main/src/test/resources/parameters/RestServerParametersEmpty.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file -- cgit 1.2.3-korg