From: waynedunican Date: Thu, 21 Nov 2024 09:04:42 +0000 (+0000) Subject: Fix weekly S3P tests X-Git-Tag: 4.1.0~5^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F25%2F139525%2F1;p=policy%2Fapex-pdp.git Fix weekly S3P tests Issue-ID: POLICY-5151 Change-Id: Ibc1f468c85f59dee3e574fb7d6dd3ace122b76dd Signed-off-by: waynedunican --- diff --git a/.github/workflows/gerrit-apex-performance-test.yaml b/.github/workflows/gerrit-apex-performance-test.yaml index f2f0b332e..da6e593bd 100644 --- a/.github/workflows/gerrit-apex-performance-test.yaml +++ b/.github/workflows/gerrit-apex-performance-test.yaml @@ -1,3 +1,21 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2024 Nordix Foundation. All rights reserved. +# ================================================================================ +# 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========================================================= + name: policy-apex-performance-test on: @@ -64,5 +82,11 @@ jobs: uses: actions/upload-artifact@v4 with: name: policy-apex-s3p-results - path: ${{ github.workspace }}/testsuites/automate-performance/s3pTestResults.jtl + path: ${{ github.workspace }}/testsuites/automate-s3p-test/s3pTestResults.jtl + + - name: Archive JMeter logs + uses: actions/upload-artifact@v4 + with: + name: policy-apex-s3p-results + path: ${{ github.workspace }}/testsuites/automate-s3p-test/jmeter.log diff --git a/.github/workflows/gerrit-apex-stability-test.yaml b/.github/workflows/gerrit-apex-stability-test.yaml new file mode 100644 index 000000000..ae50fbde3 --- /dev/null +++ b/.github/workflows/gerrit-apex-stability-test.yaml @@ -0,0 +1,91 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2024 Nordix Foundation. All rights reserved. +# ================================================================================ +# 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========================================================= + +name: policy-apex-stability-test + +on: + workflow_dispatch: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + inputs: + GERRIT_BRANCH: + description: 'Branch that change is against' + required: true + type: string + GERRIT_CHANGE_ID: + description: 'The ID for the change' + required: true + type: string + GERRIT_CHANGE_NUMBER: + description: 'The Gerrit number' + required: true + type: string + GERRIT_CHANGE_URL: + description: 'URL to the change' + required: true + type: string + GERRIT_EVENT_TYPE: + description: 'Gerrit event type' + required: true + type: string + GERRIT_PATCHSET_NUMBER: + description: 'The patch number for the change' + required: true + type: string + GERRIT_PATCHSET_REVISION: + description: 'The revision sha' + required: true + type: string + GERRIT_PROJECT: + description: 'Project in Gerrit' + required: true + type: string + GERRIT_REFSPEC: + description: 'Gerrit refspec of change' + required: true + type: string + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + + # Run every Monday at 16:30 UTC + schedule: + - cron: '30 16 * * 1' + +jobs: + run-s3p-tests: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Run S3P script + working-directory: ${{ github.workspace }}/testsuites + run: sudo bash ./run-s3p-test.sh run stability + + - name: Archive result jtl + uses: actions/upload-artifact@v4 + with: + name: policy-apex-s3p-results + path: ${{ github.workspace }}/testsuites/automate-s3p-test/s3pTestResults.jtl + + - name: Archive JMeter logs + uses: actions/upload-artifact@v4 + with: + name: policy-apex-s3p-results + path: ${{ github.workspace }}/testsuites/automate-s3p-test/jmeter.log diff --git a/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx b/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx index 4700d18b7..c43fc85b8 100644 --- a/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx +++ b/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx @@ -28,6 +28,7 @@ + false @@ -165,7 +166,7 @@ - + 6 ${HOSTNAME} ${API_PORT} @@ -3283,7 +3284,7 @@ - 200 + 201 Assertion.response_code @@ -3292,7 +3293,7 @@ - + 6 ${HOSTNAME} ${API_PORT} @@ -6135,7 +6136,7 @@ - 200 + 201 Assertion.response_code @@ -6188,7 +6189,7 @@ - 202 + 201 Assertion.response_code @@ -6202,7 +6203,7 @@ - + ${threads} 1 259200 @@ -6241,7 +6242,7 @@ - + 6 ${HOSTNAME} ${APEX_PORT} @@ -6283,8 +6284,7 @@ import org.apache.kafka.clients.producer.ProducerConfig import org.apache.kafka.common.serialization.StringSerializer def props = new Properties() -props.put("bootstrap.servers", "kafka:9092") -props.put("group.id", "new-group") +props.put("bootstrap.servers", "localhost:9092") props.put("acks", "all") props.put("retries", 0) props.put("batch.size", 16384) @@ -6356,7 +6356,7 @@ import groovy.json.JsonSlurper // Consumer properties def props = new Properties() -props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "kafka:9092") // Adjust to your Kafka bootstrap server +props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092") // Adjust to your Kafka bootstrap server props.put(ConsumerConfig.GROUP_ID_CONFIG, "apex-group") props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName()) props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName()) @@ -6398,9 +6398,9 @@ consumer.close() - + - + groovy @@ -6473,7 +6473,7 @@ producer.close() - + groovy @@ -6529,9 +6529,9 @@ consumer.close() - + - + true @@ -6602,7 +6602,7 @@ producer.close() groovy - + groovy @@ -6658,9 +6658,9 @@ consumer.close() - + - + true @@ -6731,7 +6731,7 @@ producer.close() groovy - + groovy @@ -6788,7 +6788,7 @@ consumer.close() - + 1 1 true @@ -6878,7 +6878,7 @@ consumer.close() - + 6 ${HOSTNAME} ${API_PORT} @@ -6979,7 +6979,7 @@ consumer.close() /home/wayne/dev/s3ps/apex-pdp/testsuites/apex-pdp-stability/src/main/resources/s3pTestResults.jtl - + false saveConfig diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx b/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx index 681becf1e..9f8ecce67 100644 --- a/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx +++ b/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx @@ -53,7 +53,7 @@ - + threads @@ -114,7 +114,7 @@ - + http://${HOSTNAME}:${API_PORT} @@ -155,7 +155,7 @@ false - + 1 1 true @@ -166,7 +166,7 @@ - + 6 ${HOSTNAME} ${API_PORT} @@ -3282,9 +3282,9 @@ - + - 200 + 201 Assertion.response_code @@ -6134,9 +6134,9 @@ - + - 200 + 201 Assertion.response_code @@ -6203,7 +6203,7 @@ - + ${threads} 1 7200 @@ -6216,7 +6216,7 @@ - + 6 ${HOSTNAME} ${APEX_PORT} @@ -6242,7 +6242,7 @@ - + 6 ${HOSTNAME} ${APEX_PORT} @@ -6272,7 +6272,7 @@ - + true @@ -6343,7 +6343,7 @@ producer.close() groovy - + groovy @@ -6399,7 +6399,7 @@ consumer.close() - + groovy @@ -6530,7 +6530,7 @@ consumer.close() - + true @@ -6603,7 +6603,7 @@ producer.close() groovy - + groovy @@ -6659,7 +6659,7 @@ consumer.close() - + true @@ -6732,7 +6732,7 @@ producer.close() groovy - + groovy @@ -6789,7 +6789,7 @@ consumer.close() - + 1 1 true diff --git a/testsuites/run-s3p-test.sh b/testsuites/run-s3p-test.sh index 1177140df..942bdf456 100755 --- a/testsuites/run-s3p-test.sh +++ b/testsuites/run-s3p-test.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 Nordix Foundation. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ export APEX_STAB_TEST_FILE=$TESTDIR/apex-pdp-stability/src/main/resources/apexPd if [ $1 == "run" ] then - mkdir automate-performance;cd automate-performance; + mkdir automate-s3p-test;cd automate-s3p-test; git clone "https://gerrit.onap.org/r/policy/docker" cd docker/csit @@ -46,4 +46,3 @@ then else echo "Invalid arguments provided. Usage: $0 [option..] {run | uninstall}" fi -