aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actorServiceProvider/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-03-27 12:35:23 -0400
committerJim Hahn <jrh3@att.com>2020-03-30 09:01:15 -0400
commit61a84fecc1eae8640fec2860f4b50102ed0baa64 (patch)
tree32ba4cf68bd9f6c4f97e92f665ab2de7ad788dc6 /models-interactions/model-actors/actorServiceProvider/src
parent3a374cbc9f4bef8856c3e78be1a6b4c5274cd744 (diff)
Test new actors against simulators
Also modified HttpParams to allow "path" to be blank to support any cases that really have no "path" to append to the context URI base path. Issue-ID: POLICY-2405 Change-Id: I49eebde6759659d2804b5a11c1504c37674bd0c4 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParams.java2
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParamsTest.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParams.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParams.java
index 57270ac65..be1f0f8c2 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParams.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParams.java
@@ -32,7 +32,6 @@ import org.onap.policy.common.parameters.annotations.NotNull;
* Parameters used by Operators that connect to a server via HTTP.
*/
@NotNull
-@NotBlank
@Data
@SuperBuilder(toBuilder = true)
public class HttpParams {
@@ -40,6 +39,7 @@ public class HttpParams {
/**
* Name of the HttpClient, as found in the HttpClientFactory.
*/
+ @NotBlank
private String clientName;
/**
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParamsTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParamsTest.java
index 8d4d44685..f4c6a2089 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParamsTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/parameters/HttpParamsTest.java
@@ -54,6 +54,10 @@ public class HttpParamsTest {
testValidateField("timeoutSec", "minimum", bldr -> bldr.timeoutSec(-1));
// check edge cases
+ assertFalse(params.toBuilder().clientName("").build().validate(CONTAINER).isValid());
+
+ assertTrue(params.toBuilder().path("").build().validate(CONTAINER).isValid());
+
assertFalse(params.toBuilder().timeoutSec(0).build().validate(CONTAINER).isValid());
assertTrue(params.toBuilder().timeoutSec(1).build().validate(CONTAINER).isValid());
}