summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2021-11-03 08:42:47 +0000
committerAdheli Tavares <adheli.tavares@est.tech>2021-11-03 13:06:22 +0000
commiteb7277b143841b36da32637264971686a5c9ad7d (patch)
treebc6ab909dd9ee196f8d56b62467b68bd259f9a0e
parentd95be7b4bc9e97385dd77ae97556358e7fd00e94 (diff)
Rename username for PAP operations.
Use an account other than healthcheck in PAP for provisioning of policies. Issue-ID: POLICY-2744 Change-Id: I897f7a4fffbac2d4bbd9cceb059bae1794753aa7 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java6
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupCreateOrUpdateControllerV1.java6
-rw-r--r--main/src/test/resources/e2e/PapConfigParameters.json4
-rw-r--r--main/src/test/resources/parameters/MinimumParameters.json4
-rw-r--r--main/src/test/resources/parameters/PapConfigParameters.json2
-rw-r--r--main/src/test/resources/parameters/PapConfigParametersStd.json4
-rw-r--r--main/src/test/resources/parameters/PapConfigParameters_InvalidName.json2
-rw-r--r--packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json4
-rw-r--r--postman/pap-api-collection.json2
-rw-r--r--testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json2
-rw-r--r--testsuites/stability/src/main/resources/testplans/stability.jmx4
11 files changed, 20 insertions, 20 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
index e1d1e14a..98a24a62 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
@@ -60,7 +60,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Class to perform unit test of {@link PapRestServer}.
+ * Class to perform unit test of {@link PapRestControllerV1}.
*
* @author Ram Krishna Verma (ram.krishna.verma@est.tech)
*/
@@ -214,7 +214,7 @@ public class CommonPapRestServer {
/**
* Stops the "Main".
*
- * @throws Exception if an error occurs
+ * @throws PolicyPapException if an error occurs
*/
private static void stopMain() throws PolicyPapException {
if (main != null) {
@@ -294,7 +294,7 @@ public class CommonPapRestServer {
client.register(GsonMessageBodyHandler.class);
if (includeAuth) {
- final HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic("healthcheck", "zb!XztG34");
+ final HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic("policyadmin", "zb!XztG34");
client.register(feature);
}
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupCreateOrUpdateControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupCreateOrUpdateControllerV1.java
index 31246416..2b08b2ce 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupCreateOrUpdateControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupCreateOrUpdateControllerV1.java
@@ -23,7 +23,7 @@ package org.onap.policy.pap.main.rest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import java.util.Arrays;
+import java.util.List;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.core.MediaType;
@@ -72,9 +72,9 @@ public class TestPdpGroupCreateOrUpdateControllerV1 extends CommonPapRestServer
PdpGroup group = new PdpGroup();
group.setName("drools-group");
group.setDescription("my description");
- group.setPdpSubgroups(Arrays.asList(subgrp));
+ group.setPdpSubgroups(List.of(subgrp));
PdpGroups groups = new PdpGroups();
- groups.setGroups(Arrays.asList(group));
+ groups.setGroups(List.of(group));
return Entity.entity(groups, MediaType.APPLICATION_JSON);
}
}
diff --git a/main/src/test/resources/e2e/PapConfigParameters.json b/main/src/test/resources/e2e/PapConfigParameters.json
index b10f5801..b2e100a5 100644
--- a/main/src/test/resources/e2e/PapConfigParameters.json
+++ b/main/src/test/resources/e2e/PapConfigParameters.json
@@ -3,7 +3,7 @@
"restServerParameters": {
"host": "0.0.0.0",
"port": ${port},
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"https": true
},
@@ -54,7 +54,7 @@
"clientName": "api",
"hostname": "policy-api",
"port": 6969,
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"useHttps": true,
"basePath": "policy/api/v1/healthcheck"
diff --git a/main/src/test/resources/parameters/MinimumParameters.json b/main/src/test/resources/parameters/MinimumParameters.json
index 1e4457f2..3c439d1f 100644
--- a/main/src/test/resources/parameters/MinimumParameters.json
+++ b/main/src/test/resources/parameters/MinimumParameters.json
@@ -3,7 +3,7 @@
"restServerParameters":{
"host":"0.0.0.0",
"port":6901,
- "userName":"healthcheck",
+ "userName":"policyadmin",
"password":"zb!XztG34"
},
"pdpParameters": {
@@ -43,7 +43,7 @@
"clientName": "api",
"hostname": "policy-api",
"port": 6969,
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"useHttps": true,
"basePath": "policy/api/v1/healthcheck"
diff --git a/main/src/test/resources/parameters/PapConfigParameters.json b/main/src/test/resources/parameters/PapConfigParameters.json
index 4f59d69b..bb1a7588 100644
--- a/main/src/test/resources/parameters/PapConfigParameters.json
+++ b/main/src/test/resources/parameters/PapConfigParameters.json
@@ -3,7 +3,7 @@
"restServerParameters": {
"host": "0.0.0.0",
"port": 6903,
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"https": true
},
diff --git a/main/src/test/resources/parameters/PapConfigParametersStd.json b/main/src/test/resources/parameters/PapConfigParametersStd.json
index 56e891a1..9ba3f124 100644
--- a/main/src/test/resources/parameters/PapConfigParametersStd.json
+++ b/main/src/test/resources/parameters/PapConfigParametersStd.json
@@ -3,7 +3,7 @@
"restServerParameters": {
"host": "0.0.0.0",
"port": ${port},
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"https": true
},
@@ -56,7 +56,7 @@
"clientName": "api",
"hostname": "policy-api",
"port": 6969,
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"useHttps": true,
"basePath": "policy/api/v1/healthcheck"
diff --git a/main/src/test/resources/parameters/PapConfigParameters_InvalidName.json b/main/src/test/resources/parameters/PapConfigParameters_InvalidName.json
index 3e812459..97db16c5 100644
--- a/main/src/test/resources/parameters/PapConfigParameters_InvalidName.json
+++ b/main/src/test/resources/parameters/PapConfigParameters_InvalidName.json
@@ -3,7 +3,7 @@
"restServerParameters":{
"host":"0.0.0.0",
"port":6902,
- "userName":"healthcheck",
+ "userName":"policyadmin",
"password":"zb!XztG34"
},
"pdpParameters": {
diff --git a/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json b/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json
index 573ecc9a..c350e16c 100644
--- a/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json
+++ b/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json
@@ -3,7 +3,7 @@
"restServerParameters": {
"host": "0.0.0.0",
"port": 6969,
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"https": true,
"aaf": false,
@@ -60,7 +60,7 @@
"clientName": "api",
"hostname": "policy-api",
"port": 6969,
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"useHttps": true,
"basePath": "policy/api/v1/healthcheck"
diff --git a/postman/pap-api-collection.json b/postman/pap-api-collection.json
index 421b9a73..483468c4 100644
--- a/postman/pap-api-collection.json
+++ b/postman/pap-api-collection.json
@@ -1097,7 +1097,7 @@
"variable": [
{
"key": "USER",
- "value": "healthcheck",
+ "value": "policyadmin",
"type": "string"
},
{
diff --git a/testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json b/testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json
index b98cdef9..2338f93b 100644
--- a/testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json
+++ b/testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json
@@ -3,7 +3,7 @@
"restServerParameters": {
"host": "0.0.0.0",
"port": 6969,
- "userName": "healthcheck",
+ "userName": "policyadmin",
"password": "zb!XztG34",
"https": true,
"aaf": false
diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx
index 2291883d..32d985fa 100644
--- a/testsuites/stability/src/main/resources/testplans/stability.jmx
+++ b/testsuites/stability/src/main/resources/testplans/stability.jmx
@@ -56,14 +56,14 @@
<collectionProp name="AuthManager.auth_list">
<elementProp name="" elementType="Authorization">
<stringProp name="Authorization.url">http://${PAP_HOST}:${PAP_PORT}/policy/pap/v1</stringProp>
- <stringProp name="Authorization.username">healthcheck</stringProp>
+ <stringProp name="Authorization.username">policyadmin</stringProp>
<stringProp name="Authorization.password">zb!XztG34</stringProp>
<stringProp name="Authorization.domain"></stringProp>
<stringProp name="Authorization.realm"></stringProp>
</elementProp>
<elementProp name="" elementType="Authorization">
<stringProp name="Authorization.url">http://${API_HOST}:${API_PORT}/policy/api/v1</stringProp>
- <stringProp name="Authorization.username">healthcheck</stringProp>
+ <stringProp name="Authorization.username">policyadmin</stringProp>
<stringProp name="Authorization.password">zb!XztG34</stringProp>
<stringProp name="Authorization.domain"></stringProp>
<stringProp name="Authorization.realm"></stringProp>