diff options
Diffstat (limited to 'main/src/test/resources')
9 files changed, 57 insertions, 0 deletions
diff --git a/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt b/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt new file mode 100644 index 00000000..2ab9c1b4 --- /dev/null +++ b/main/src/test/resources/expectedValidationResults/InvalidRestServerParameters.txt @@ -0,0 +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 diff --git a/main/src/test/resources/parameters/ApiConfigParameters.json b/main/src/test/resources/parameters/ApiConfigParameters.json new file mode 100644 index 00000000..8fae1238 --- /dev/null +++ b/main/src/test/resources/parameters/ApiConfigParameters.json @@ -0,0 +1,9 @@ +{ + "name":"ApiGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + } +} diff --git a/main/src/test/resources/parameters/ApiConfigParameters_InvalidName.json b/main/src/test/resources/parameters/ApiConfigParameters_InvalidName.json new file mode 100644 index 00000000..80fb8232 --- /dev/null +++ b/main/src/test/resources/parameters/ApiConfigParameters_InvalidName.json @@ -0,0 +1,9 @@ +{ + "name":" ", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + } +} diff --git a/main/src/test/resources/parameters/ApiConfigParameters_InvalidRestServerParameters.json b/main/src/test/resources/parameters/ApiConfigParameters_InvalidRestServerParameters.json new file mode 100644 index 00000000..2d394fbc --- /dev/null +++ b/main/src/test/resources/parameters/ApiConfigParameters_InvalidRestServerParameters.json @@ -0,0 +1,9 @@ +{ + "name":"ApiGroup", + "restServerParameters":{ + "host":"", + "port":-1, + "userName":"", + "password":"" + } +} diff --git a/main/src/test/resources/parameters/BadParameters.json b/main/src/test/resources/parameters/BadParameters.json new file mode 100644 index 00000000..de2040cc --- /dev/null +++ b/main/src/test/resources/parameters/BadParameters.json @@ -0,0 +1,3 @@ +{ + "name" : [] +}
\ No newline at end of file diff --git a/main/src/test/resources/parameters/EmptyParameters.json b/main/src/test/resources/parameters/EmptyParameters.json new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/main/src/test/resources/parameters/EmptyParameters.json diff --git a/main/src/test/resources/parameters/InvalidParameters.json b/main/src/test/resources/parameters/InvalidParameters.json new file mode 100644 index 00000000..de2040cc --- /dev/null +++ b/main/src/test/resources/parameters/InvalidParameters.json @@ -0,0 +1,3 @@ +{ + "name" : [] +}
\ No newline at end of file diff --git a/main/src/test/resources/parameters/MinimumParameters.json b/main/src/test/resources/parameters/MinimumParameters.json new file mode 100644 index 00000000..61c6c869 --- /dev/null +++ b/main/src/test/resources/parameters/MinimumParameters.json @@ -0,0 +1,9 @@ +{ + "name":"ApiGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + } +} diff --git a/main/src/test/resources/parameters/NoParameters.json b/main/src/test/resources/parameters/NoParameters.json new file mode 100644 index 00000000..6b0805d3 --- /dev/null +++ b/main/src/test/resources/parameters/NoParameters.json @@ -0,0 +1,8 @@ +{ + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + } +}
\ No newline at end of file |