Distribution S3P test 13/120013/1
authoradheli.tavares <adheli.tavares@est.tech>
Tue, 30 Mar 2021 10:06:03 +0000 (11:06 +0100)
committeradheli.tavares <adheli.tavares@est.tech>
Tue, 30 Mar 2021 13:07:24 +0000 (14:07 +0100)
Updating scripts and files related to S3P tests.

Issue-ID: POLICY-3113
Change-Id: I6c6d50a2f0e6b47deac5e505fb841eebbbbea437
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
17 files changed:
testsuites/performance/src/main/resources/testplans/performance.jmx
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_1.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_10.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_2.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_3.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_4.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_5.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_6.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_7.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_8.csar
testsuites/performance/src/main/resources/testplans/testCsars/test_csar_9.csar
testsuites/stability/src/main/resources/distributionsetup/distribution/bin/policy-dist.sh
testsuites/stability/src/main/resources/distributionsetup/distribution/etc/logback.xml [new file with mode: 0644]
testsuites/stability/src/main/resources/distributionsetup/setup_distribution.sh
testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh
testsuites/stability/src/main/resources/testplans/sample_csar_with_apex_policy.csar
testsuites/stability/src/main/resources/testplans/stability.jmx

index 6fd00bf..d92fe04 100644 (file)
@@ -10,7 +10,7 @@
         <collectionProp name="Arguments.arguments">
           <elementProp name="PAP_HOST" elementType="Argument">
             <stringProp name="Argument.name">PAP_HOST</stringProp>
-            <stringProp name="Argument.value">${__P(host,10.2.0.27)}</stringProp>
+            <stringProp name="Argument.value">${__P(host,10.2.0.110)}</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
           <elementProp name="PAP_PORT" elementType="Argument">
@@ -20,7 +20,7 @@
           </elementProp>
           <elementProp name="API_HOST" elementType="Argument">
             <stringProp name="Argument.name">API_HOST</stringProp>
-            <stringProp name="Argument.value">${__P(host,10.2.0.27)}</stringProp>
+            <stringProp name="Argument.value">${__P(host,10.2.0.110)}</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
           <elementProp name="API_PORT" elementType="Argument">
           </elementProp>
           <elementProp name="DISTRIBUTION_PORT" elementType="Argument">
             <stringProp name="Argument.name">DISTRIBUTION_PORT</stringProp>
-            <stringProp name="Argument.value">7001</stringProp>
+            <stringProp name="Argument.value">7002</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
           <elementProp name="DURATION" elementType="Argument">
             <stringProp name="Argument.name">DURATION</stringProp>
-            <stringProp name="Argument.value">${__P(duration, 259200)}</stringProp>
+            <stringProp name="Argument.value">${__P(duration, 14400)}</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
           <elementProp name="SCRIPT_DIR" elementType="Argument">
@@ -50,7 +50,7 @@
           </elementProp>
           <elementProp name="WATCHED_FOLDER" elementType="Argument">
             <stringProp name="Argument.name">WATCHED_FOLDER</stringProp>
-            <stringProp name="Argument.value">${__P(watchedfolder, /tmp/policydistribution/distributionmounts)}</stringProp>
+            <stringProp name="Argument.value">${__P(watchedfolder, /tmp/policydistribution/distributionmount)}</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
         </collectionProp>
         <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
           <collectionProp name="AuthManager.auth_list">
             <elementProp name="" elementType="Authorization">
-              <stringProp name="Authorization.url">https://${PAP_HOST}:7000/policy/pap/v1</stringProp>
+              <stringProp name="Authorization.url">https://${PAP_HOST}:${PAP_PORT}/policy/pap/v1</stringProp>
               <stringProp name="Authorization.username">healthcheck</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">https://${API_HOST}:6969/policy/api/v1</stringProp>
+              <stringProp name="Authorization.url">https://${API_HOST}:${API_PORT}/policy/api/v1</stringProp>
               <stringProp name="Authorization.username">healthcheck</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://127.0.0.1:6969/</stringProp>
+              <stringProp name="Authorization.url">http://${DISTRIBUTION_HOST}:${DISTRIBUTION_PORT}/</stringProp>
               <stringProp name="Authorization.username">healthcheck</stringProp>
               <stringProp name="Authorization.password">zb!XztG34</stringProp>
               <stringProp name="Authorization.domain"></stringProp>
           <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="Remove CSAR" enabled="true">
             <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
             <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
-            <stringProp name="SystemSampler.command">${SCRIPT_DIR}removecsars.sh</stringProp>
+            <stringProp name="SystemSampler.command">${SCRIPT_DIR}/removecsars.sh</stringProp>
             <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
               <collectionProp name="Arguments.arguments">
                 <elementProp name="" elementType="Argument">
           <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="Undeploy/Delete Policies" enabled="true">
             <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
             <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
-            <stringProp name="SystemSampler.command">${SCRIPT_DIR}clearuppolicies.sh</stringProp>
+            <stringProp name="SystemSampler.command">${SCRIPT_DIR}/clearuppolicies.sh</stringProp>
             <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
               <collectionProp name="Arguments.arguments">
                 <elementProp name="" elementType="Argument">
         <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
           <collectionProp name="AuthManager.auth_list">
             <elementProp name="" elementType="Authorization">
-              <stringProp name="Authorization.url">https://${PAP_HOST}:7000/policy/pap/v1</stringProp>
+              <stringProp name="Authorization.url">https://${PAP_HOST}:${PAP_PORT}/policy/pap/v1</stringProp>
               <stringProp name="Authorization.username">healthcheck</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">https://${API_HOST}:6969/policy/api/v1</stringProp>
+              <stringProp name="Authorization.url">https://${API_HOST}:${API_PORT}/policy/api/v1</stringProp>
               <stringProp name="Authorization.username">healthcheck</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://127.0.0.1:6969/</stringProp>
+              <stringProp name="Authorization.url">http://${DISTRIBUTION_HOST}:${DISTRIBUTION_PORT}/</stringProp>
               <stringProp name="Authorization.username">healthcheck</stringProp>
               <stringProp name="Authorization.password">zb!XztG34</stringProp>
               <stringProp name="Authorization.domain"></stringProp>
index 8fbe9e3..af2f1b7 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_1.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_1.csar differ
index 49d7cbe..a7efde6 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_10.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_10.csar differ
index d9e49a9..2d753a9 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_2.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_2.csar differ
index 16260a6..7f79af6 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_3.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_3.csar differ
index 228c710..cf60e61 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_4.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_4.csar differ
index 3e9f73c..a0cde2f 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_5.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_5.csar differ
index 17b9f11..a3a734f 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_6.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_6.csar differ
index 8cbd358..57cd953 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_7.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_7.csar differ
index d1047b7..0912002 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_8.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_8.csar differ
index 9b777de..98cd56a 100644 (file)
Binary files a/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_9.csar and b/testsuites/performance/src/main/resources/testplans/testCsars/test_csar_9.csar differ
index 3ba423e..dc1dd70 100644 (file)
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/bin/sh
 #
 # ============LICENSE_START=======================================================
 #  Copyright (C) 2020 Ericsson. All rights reserved.
-#  Modifications Copyright (C) 2019-2020 Nordix Foundation.
+#  Modifications Copyright (C) 2019-2021 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -32,19 +32,18 @@ else
     CONFIG_FILE=${CONFIG_FILE}
 fi
 
-if [ -z "$CONFIG_FILE" ]
-  then
+if [ -z "$CONFIG_FILE" ]; then
     CONFIG_FILE="${POLICY_HOME}/etc/defaultConfig.json"
 fi
 
 if [[ -f "${POLICY_HOME}"/etc/mounted/policy-truststore ]]; then
     echo "overriding policy-truststore"
-    cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore  "${TRUSTSTORE}"
+    cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
 fi
 
 if [[ -f "${POLICY_HOME}"/etc/mounted/policy-keystore ]]; then
     echo "overriding policy-keystore"
-    cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore  "${KEYSTORE}"
+    cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
 fi
 
 if [[ -f "${POLICY_HOME}"/etc/mounted/logback.xml ]]; then
diff --git a/testsuites/stability/src/main/resources/distributionsetup/distribution/etc/logback.xml b/testsuites/stability/src/main/resources/distributionsetup/distribution/etc/logback.xml
new file mode 100644 (file)
index 0000000..f1fbde3
--- /dev/null
@@ -0,0 +1,110 @@
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2018 Ericsson. All rights reserved.
+   Modifications Copyright (C) 2021 Nordix Foundation.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+    <property name="logDir" value="/home/policydistribution/logs" />
+
+    <property name="errorLog" value="error" />
+    <property name="debugLog" value="debug" />
+    <property name="networkLog" value="network" />
+
+    <property name="metricLog" value="metric" />
+    <property name="transactionLog" value="audit" />
+
+    <property name="debugPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+    <property name="errorPattern" value="${debugPattern}" />
+    <property name="networkPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
+
+    <property name="metricPattern" value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}|%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}|%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
+    <property name="transactionPattern" value="${metricPattern}" />
+
+    <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${errorLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>WARN</level>
+        </filter>
+        <encoder>
+            <pattern>${errorPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="ErrorOut" />
+    </appender>
+
+    <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${debugLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${debugPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="DebugOut" />
+    </appender>
+
+    <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${networkLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${networkPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="NetworkOut" />
+    </appender>
+
+    <logger name="network" level="INFO" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+    </logger>
+
+    <root level="INFO">
+        <appender-ref ref="AsyncDebugOut" />
+        <appender-ref ref="AsyncErrorOut" />
+    </root>
+
+</configuration>
index 763f47e..54bb88a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-#  Copyright (c) 2020 Nordix Foundation.
+#  Copyright (c) 2020-2021 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # ============LICENSE_END=========================================================
 
 # the directory of the script
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 echo ${DIR}
 
-if [ "$#" -lt 2 ];
-  then
-    echo "PAP and PolicyAPI IPs should be passed as two parameters. PAP IP goes first."
-    exit 1
+if [ "$#" -lt 2 ]; then
+  echo "PAP and PolicyAPI IPs should be passed as two parameters. PAP IP goes first."
+  exit 1
 else
-    PAP=$1
-    echo "PAP IP: ${PAP}"
-    API=$2
-    echo "Policy API IP: $API"
+  PAP=$1
+  echo "PAP IP: ${PAP}"
+  API=$2
+  echo "Policy API IP: $API"
 fi
-docker run -v /tmp/policydistribution/distributionmount:/home/policydistribution --add-host policy-api:${API} --add-host policy-pap:${PAP} -p 6969:6969 -p 9090:9090  --name policy-distribution -v ${DIR}/distribution/bin/policy-dist.sh:/opt/app/policy/distribution/bin/policy-dist.sh -v ${DIR}/distribution/etc/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json -d --rm nexus3.onap.org:10001/onap/policy-distribution:2.3.1
 
+docker run -v /tmp/policydistribution/distributionmount:/home/policydistribution --add-host policy-api:${API} --add-host policy-pap:${PAP} -p 6969:6969 -p 9090:9090  --name policy-distribution -v ${DIR}/distribution/bin/policy-dist.sh:/opt/app/policy/distribution/bin/policy-dist.sh -v ${DIR}/distribution/etc/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json -v ${DIR}/distribution/etc/logback.xml:/opt/app/policy/distribution/etc/logback.xml -d --rm nexus3.onap.org:10001/onap/policy-distribution:2.5.2-SNAPSHOT
index c77a3ca..55fea5d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-#  Copyright (c) 2020 Nordix Foundation.
+#  Copyright (c) 2020-2021 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # ============LICENSE_END=========================================================
 
 # the directory of the script
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 echo ${DIR}
 
+# change to VM IP
+POLICY_API_HOST=127.0.0.1
+
 # the temp directory used, within $DIR
 # omit the -p parameter to create a temporal directory in the default location
-WORK_DIR=`mktemp -d -p "$DIR"`
+WORK_DIR=$(mktemp -d -p "$DIR")
 echo ${WORK_DIR}
 
 cd ${WORK_DIR}
@@ -47,19 +50,19 @@ git clone http://gerrit.onap.org/r/oparent
 git clone --depth 1 https://gerrit.onap.org/r/policy/models -b master
 
 cd models/models-sim/models-sim-dmaap
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests  --settings ${WORK_DIR}/oparent/settings.xml
+${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml
 bash ./src/main/package/docker/docker_build.sh
 
 cd ../policy-models-sim-pdp
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests  --settings ${WORK_DIR}/oparent/settings.xml
+${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml
 bash ./src/main/package/docker/docker_build.sh
 
 cd ${DIR}
 rm -rf ${WORK_DIR}
 
-docker run -p 3306:3306 -v ${DIR}/config/db:/docker-entrypoint-initdb.d --name mariadb  --env-file ${DIR}/config/db/db.conf -d --rm mariadb:10.2.14 --lower-case-table-names=1 --wait_timeout=28800
+docker run -p 3306:3306 -v ${DIR}/config/db:/docker-entrypoint-initdb.d --name mariadb --env-file ${DIR}/config/db/db.conf -d --rm mariadb:10.2.14 --lower-case-table-names=1 --wait_timeout=28800
 docker run -p 3904:3904 -d --name message-router --rm dmaap/simulator:latest
 sleep 10
 docker run --link message-router:message-router -d --rm --name pdp-simulator pdp/simulator:latest
-docker run -p 6969:6969 --link mariadb:mariadb --name policy-api -d --rm nexus3.onap.org:10001/onap/policy-api:2.2.3-SNAPSHOT
-docker run -p 7000:6969 --link mariadb:mariadb --link message-router:message-router --name policy-pap -d --rm nexus3.onap.org:10001/onap/policy-pap:2.2.2-SNAPSHOT
+docker run -p 6969:6969 --link mariadb:mariadb --name policy-api -d --rm nexus3.onap.org:10001/onap/policy-api:2.4.2-SNAPSHOT
+docker run -p 7000:6969 --link mariadb:mariadb --link message-router:message-router --name policy-pap --add-host policy-api:${POLICY_API_HOST} -d --rm nexus3.onap.org:10001/onap/policy-pap:2.4.2-SNAPSHOT
index 435eaa0..f1c5fe8 100644 (file)
Binary files a/testsuites/stability/src/main/resources/testplans/sample_csar_with_apex_policy.csar and b/testsuites/stability/src/main/resources/testplans/sample_csar_with_apex_policy.csar differ
index 4ad3c40..d29ffda 100644 (file)
@@ -8,11 +8,6 @@
       <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
       <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
         <collectionProp name="Arguments.arguments">
-          <elementProp name="PAP_HOST" elementType="Argument">
-            <stringProp name="Argument.name">PAP_HOST</stringProp>
-            <stringProp name="Argument.value">${__P(host,10.2.0.27)}</stringProp>
-            <stringProp name="Argument.metadata">=</stringProp>
-          </elementProp>
           <elementProp name="SCRIPT_DIR" elementType="Argument">
             <stringProp name="Argument.name">SCRIPT_DIR</stringProp>
             <stringProp name="Argument.value">${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__BeanShell(File.separator,)}</stringProp>
           </elementProp>
           <elementProp name="API_HOST" elementType="Argument">
             <stringProp name="Argument.name">API_HOST</stringProp>
-            <stringProp name="Argument.value">${__P(host,10.2.0.27)}</stringProp>
+            <stringProp name="Argument.value">${__P(host,10.2.0.110)}</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="API_PORT" elementType="Argument">
+            <stringProp name="Argument.name">API_PORT</stringProp>
+            <stringProp name="Argument.value">6969</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="PAP_HOST" elementType="Argument">
+            <stringProp name="Argument.name">PAP_HOST</stringProp>
+            <stringProp name="Argument.value">${__P(host,10.2.0.110)}</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
           <elementProp name="PAP_PORT" elementType="Argument">
             <stringProp name="Argument.value">7000</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
-          <elementProp name="API_PORT" elementType="Argument">
-            <stringProp name="Argument.name">API_PORT</stringProp>
-            <stringProp name="Argument.value">6969</stringProp>
+          <elementProp name="DISTRIBUTION_HOST" elementType="Argument">
+            <stringProp name="Argument.name">DISTRIBUTION_HOST</stringProp>
+            <stringProp name="Argument.value">${__P(distributionhost,127.0.0.1)}</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="DISTRIBUTION_PORT" elementType="Argument">
+            <stringProp name="Argument.name">DISTRIBUTION_PORT</stringProp>
+            <stringProp name="Argument.value">7002</stringProp>
             <stringProp name="Argument.metadata">=</stringProp>
           </elementProp>
           <elementProp name="TESTCSARLOCATION" elementType="Argument">
             </elementProp>
           </collectionProp>
         </HeaderManager>
-        <hashTree/>
+        <hashTree />
         <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
           <collectionProp name="AuthManager.auth_list">
             <elementProp name="" elementType="Authorization">
-              <stringProp name="Authorization.url">https://${PAP_HOST}:7000/policy/pap/v1</stringProp>
+              <stringProp name="Authorization.url">https://${PAP_HOST}:${PAP_PORT}/policy/pap/v1</stringProp>
               <stringProp name="Authorization.username">healthcheck</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">https://${API_HOST}:6969/policy/api/v1</stringProp>
+              <stringProp name="Authorization.url">https://${API_HOST}:${API_PORT}/policy/api/v1</stringProp>
               <stringProp name="Authorization.username">healthcheck</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://127.0.0.1:6969/</stringProp>
+              <stringProp name="Authorization.url">http://${DISTRIBUTION_HOST}:${DISTRIBUTION_PORT}/</stringProp>
               <stringProp name="Authorization.username">healthcheck</stringProp>
               <stringProp name="Authorization.password">zb!XztG34</stringProp>
               <stringProp name="Authorization.domain"></stringProp>
           </collectionProp>
           <boolProp name="AuthManager.clearEachIteration">true</boolProp>
         </AuthManager>
-        <hashTree/>
-        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Delete Old CSAR" enabled="true"/>
+        <hashTree />
+        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Delete Old CSAR" enabled="true" />
         <hashTree>
           <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="Remove CSAR" enabled="true">
             <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
             <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
-            <stringProp name="SystemSampler.command">${SCRIPT_DIR}removecsar.sh</stringProp>
+            <stringProp name="SystemSampler.command">${SCRIPT_DIR}/removecsar.sh</stringProp>
             <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <stringProp name="SystemSampler.directory"></stringProp>
           </SystemSampler>
-          <hashTree/>
+          <hashTree />
         </hashTree>
-        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Add CSAR" enabled="true"/>
+        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Add CSAR" enabled="true" />
         <hashTree>
           <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="Add CSAR script" enabled="true">
             <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
             <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
-            <stringProp name="SystemSampler.command">${SCRIPT_DIR}addcsar.sh</stringProp>
+            <stringProp name="SystemSampler.command">${SCRIPT_DIR}/addcsar.sh</stringProp>
             <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
               <collectionProp name="Arguments.arguments">
                 <elementProp name="" elementType="Argument">
               </collectionProp>
             </elementProp>
             <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <stringProp name="SystemSampler.directory"></stringProp>
           </SystemSampler>
               </objProp>
               <stringProp name="filename"></stringProp>
             </ResultCollector>
-            <hashTree/>
+            <hashTree />
             <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
               <collectionProp name="Asserion.test_strings">
                 <stringProp name="1737356164">CSAR Copied Successfully</stringProp>
               <boolProp name="Assertion.assume_success">false</boolProp>
               <intProp name="Assertion.test_type">2</intProp>
             </ResponseAssertion>
-            <hashTree/>
+            <hashTree />
           </hashTree>
         </hashTree>
         <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
           <stringProp name="ConstantTimer.delay">300</stringProp>
         </ConstantTimer>
-        <hashTree/>
-        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="HealthCheck/Statistics" enabled="true"/>
+        <hashTree />
+        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="HealthCheck/Statistics" enabled="true" />
         <hashTree>
           <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Healthcheck" enabled="true">
             <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
-            <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
-            <stringProp name="HTTPSampler.port">6969</stringProp>
+            <stringProp name="HTTPSampler.domain">${DISTRIBUTION_HOST}</stringProp>
+            <stringProp name="HTTPSampler.port">${DISTRIBUTION_PORT}</stringProp>
             <stringProp name="HTTPSampler.protocol">http</stringProp>
             <stringProp name="HTTPSampler.contentEncoding"></stringProp>
             <stringProp name="HTTPSampler.path">healthcheck</stringProp>
               <boolProp name="Assertion.assume_success">false</boolProp>
               <intProp name="Assertion.test_type">8</intProp>
             </ResponseAssertion>
-            <hashTree/>
+            <hashTree />
           </hashTree>
           <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Statistics" enabled="true">
             <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
-            <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
-            <stringProp name="HTTPSampler.port">6969</stringProp>
+            <stringProp name="HTTPSampler.domain">${DISTRIBUTION_HOST}</stringProp>
+            <stringProp name="HTTPSampler.port">${DISTRIBUTION_PORT}</stringProp>
             <stringProp name="HTTPSampler.protocol">http</stringProp>
             <stringProp name="HTTPSampler.contentEncoding"></stringProp>
             <stringProp name="HTTPSampler.path">statistics</stringProp>
               <boolProp name="Assertion.assume_success">false</boolProp>
               <intProp name="Assertion.test_type">8</intProp>
             </ResponseAssertion>
-            <hashTree/>
+            <hashTree />
           </hashTree>
         </hashTree>
-        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Assert Policy Created" enabled="true"/>
+        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Assert Policy Created" enabled="true" />
         <hashTree>
           <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CheckPDPGroupQuery" enabled="true">
             <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
             <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
               <boolProp name="INVERT">false</boolProp>
               <boolProp name="ISREGEX">false</boolProp>
             </JSONPathAssertion>
-            <hashTree/>
+            <hashTree />
             <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
               <boolProp name="ResultCollector.error_logging">false</boolProp>
               <objProp>
               </objProp>
               <stringProp name="filename"></stringProp>
             </ResultCollector>
-            <hashTree/>
+            <hashTree />
           </hashTree>
           <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Policy Deployed" enabled="true">
             <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
             <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
           <hashTree>
             <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="Assert Policy Type" enabled="true">
               <stringProp name="JSON_PATH">$[:2].policy-type</stringProp>
-              <stringProp name="EXPECTED_VALUE">onap.policies.controlloop.operational.Apex</stringProp>
+              <stringProp name="EXPECTED_VALUE">onap.policies.controlloop.operational.common.Apex</stringProp>
               <boolProp name="JSONVALIDATION">true</boolProp>
               <boolProp name="EXPECT_NULL">false</boolProp>
               <boolProp name="INVERT">false</boolProp>
               <boolProp name="ISREGEX">false</boolProp>
             </JSONPathAssertion>
-            <hashTree/>
+            <hashTree />
             <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="Assert Policy ID" enabled="true">
               <stringProp name="JSON_PATH">$[:2].policy-id</stringProp>
               <stringProp name="EXPECTED_VALUE">operational.apex.sampledomain</stringProp>
               <boolProp name="INVERT">false</boolProp>
               <boolProp name="ISREGEX">false</boolProp>
             </JSONPathAssertion>
-            <hashTree/>
+            <hashTree />
           </hashTree>
           <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
             <boolProp name="ResultCollector.error_logging">false</boolProp>
             </objProp>
             <stringProp name="filename"></stringProp>
           </ResultCollector>
-          <hashTree/>
+          <hashTree />
           <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
             <stringProp name="ConstantTimer.delay">10000</stringProp>
           </ConstantTimer>
-          <hashTree/>
+          <hashTree />
         </hashTree>
-        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Clear up Policies" enabled="true"/>
+        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Clear up Policies" enabled="true" />
         <hashTree>
           <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Undeploy Policy " enabled="true">
             <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
             <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
           <hashTree>
             <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
               <collectionProp name="Asserion.test_strings">
-                <stringProp name="49586">200</stringProp>
+                <stringProp name="49586">202</stringProp>
               </collectionProp>
               <stringProp name="Assertion.custom_message"></stringProp>
               <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
               <boolProp name="Assertion.assume_success">false</boolProp>
               <intProp name="Assertion.test_type">8</intProp>
             </ResponseAssertion>
-            <hashTree/>
+            <hashTree />
           </hashTree>
           <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy" enabled="true">
             <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp>
             <stringProp name="HTTPSampler.port">${API_PORT}</stringProp>
               <boolProp name="Assertion.assume_success">false</boolProp>
               <intProp name="Assertion.test_type">8</intProp>
             </ResponseAssertion>
-            <hashTree/>
+            <hashTree />
           </hashTree>
         </hashTree>
-        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Assert Policy Deleted" enabled="true"/>
+        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Assert Policy Deleted" enabled="true" />
         <hashTree>
           <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CheckPDPGroupQueryForDeletedPolicy" enabled="true">
             <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-              <collectionProp name="Arguments.arguments"/>
+              <collectionProp name="Arguments.arguments" />
             </elementProp>
             <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
             <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
               <boolProp name="INVERT">false</boolProp>
               <boolProp name="ISREGEX">false</boolProp>
             </JSONPathAssertion>
-            <hashTree/>
+            <hashTree />
           </hashTree>
         </hashTree>
         <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
           </objProp>
           <stringProp name="filename"></stringProp>
         </ResultCollector>
-        <hashTree/>
+        <hashTree />
         <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
           <boolProp name="ResultCollector.error_logging">false</boolProp>
           <objProp>
               <connectTime>true</connectTime>
             </value>
           </objProp>
-          <stringProp name="filename">Distribution_Stability_Log</stringProp>
+          <stringProp name="filename">distribution_stability.jtl</stringProp>
         </ResultCollector>
-        <hashTree/>
+        <hashTree />
       </hashTree>
     </hashTree>
   </hashTree>