summaryrefslogtreecommitdiffstats
path: root/models-pdp/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-22 12:01:37 -0400
committerJim Hahn <jrh3@att.com>2021-06-23 11:18:31 -0400
commitf2078f5fd455c02f615b33700e1b545e0055e2fe (patch)
tree89e01ab7b4885a4fef62b23d21f12647ee49b593 /models-pdp/src/test/java
parent33c54226a0463e8ed234177bc9b894dd6797ab74 (diff)
Add "source" to PAP-PDP messages
Added a "source" field to the PdpStateChange and PdpUpdate messages so that PAP can record a unique name in the message, for logging purposes. In a separate review, planning to add a method in policy-common for creating the unique name. Once that has been created, it will be used by PAP, to populate the "source" field, and all PDPs, to populate the "name" field in the PdpStatus messages. Issue-ID: POLICY-3409 Change-Id: I86c97702abe62a5672720330df50b7b106187661 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pdp/src/test/java')
-rw-r--r--models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStateChangeTest.java3
-rw-r--r--models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStateChangeTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStateChangeTest.java
index f50d2a7b7..aa715b775 100644
--- a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStateChangeTest.java
+++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStateChangeTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Models
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -43,6 +43,7 @@ public class PdpStateChangeTest {
assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpStateChange(orig).toString()));
// verify with all values
+ orig.setSource("my-source");
orig.setName("my-name");
orig.setPdpGroup("my-group");
orig.setPdpSubgroup("my-subgroup");
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java
index a24b410ae..13ee54b52 100644
--- a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java
+++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Models
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019-2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -49,6 +49,7 @@ public class PdpUpdateTest {
assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpUpdate(orig).toString()));
// verify with all values
+ orig.setSource("my-source");
orig.setDescription("my-description");
orig.setName("my-name");
orig.setPdpGroup("my-group");