From: waynedunican Date: Wed, 6 Nov 2024 15:26:51 +0000 (+0000) Subject: Fix S3P weekly tests X-Git-Tag: 8.0.1~3 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F42%2F139342%2F4;p=policy%2Fclamp.git Fix S3P weekly tests - Added stability test Issue-ID: POLICY-5154 Change-Id: I8996b7ca83943f026553d880fafd8c4d00252bcc Signed-off-by: waynedunican --- diff --git a/.github/workflows/gerrit-clamp-performance-test.yaml b/.github/workflows/gerrit-clamp-performance-test.yaml index 45b01b8c6..1def8fb36 100644 --- a/.github/workflows/gerrit-clamp-performance-test.yaml +++ b/.github/workflows/gerrit-clamp-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: acm-performance-test on: @@ -64,5 +82,11 @@ jobs: uses: actions/upload-artifact@v4 with: name: acm-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: acm-s3p-results + path: ${{ github.workspace }}/testsuites/automate-s3p-test/jmeter.log diff --git a/.github/workflows/gerrit-clamp-stability-test.yaml b/.github/workflows/gerrit-clamp-stability-test.yaml new file mode 100644 index 000000000..663048f57 --- /dev/null +++ b/.github/workflows/gerrit-clamp-stability-test.yaml @@ -0,0 +1,92 @@ +# ============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: acm-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: acm-s3p-results + path: ${{ github.workspace }}/testsuites/automate-s3p-test/s3pTestResults.jtl + + - name: Archive JMeter logs + uses: actions/upload-artifact@v4 + with: + name: acm-s3p-results + path: ${{ github.workspace }}/testsuites/automate-s3p-test/jmeter.log + diff --git a/testsuites/run-s3p-test.sh b/testsuites/run-s3p-test.sh index 9a4d044f0..e030c7094 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 ACM_STAB_TEST_FILE=$TESTDIR/stability/src/main/resources/testplans/stabil 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 diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx index 5e4a64df6..dc0d5c05e 100644 --- a/testsuites/stability/src/main/resources/testplans/stability.jmx +++ b/testsuites/stability/src/main/resources/testplans/stability.jmx @@ -1,5 +1,5 @@ - + Policy Clamp ACM Stability Tests @@ -32,7 +32,7 @@ - + http://${RUNTIME_HOST}:${RUNTIME_PORT}/onap/policy/clamp/acm @@ -67,20 +67,26 @@ + 1 + 1 + 260000 + true stoptest - + 1 false - 1 - 1 - false - 260000 - - true + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions + true + POST + true true @@ -1568,21 +1574,6 @@ - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions - POST - true - false - true - false - false - false - false - 6 - false - 0 @@ -1611,25 +1602,18 @@ - false - - - + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/v2/participants - PUT true - false + PUT true - false - false - false - false - 6 - false - 0 + false + + + @@ -1645,6 +1629,14 @@ + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId} + true + PUT + true true @@ -1657,21 +1649,6 @@ - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions/${compositionId} - PUT - true - false - true - false - false - false - false - 6 - false - 0 @@ -1691,25 +1668,18 @@ - false - - - + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/v2/compositions/${compositionId} - GET true - false + GET true - false - false - false - false - 6 - false - 0 + false + + + @@ -1733,6 +1703,14 @@ + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances + true + POST + true true @@ -1767,21 +1745,6 @@ - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances - POST - true - false - true - false - false - false - false - 6 - false - 0 @@ -1810,19 +1773,17 @@ - + + 1 + 1 + 7200 + true + true continue - + -1 false - 1 - 1 - true - 260000 - - true - false @@ -1839,6 +1800,14 @@ vars.put("deployState", deployState); + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + true + PUT + true true @@ -1852,21 +1821,6 @@ vars.put("deployState", deployState); - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} - PUT - true - false - true - false - false - false - false - 6 - false - 0 @@ -1889,25 +1843,18 @@ vars.put("deployState", deployState); - false - - - + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} - GET true - false + GET true - false - false - false - false - 6 - false - 0 + false + + + @@ -1930,6 +1877,14 @@ vars.put("deployState", deployState); + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + true + PUT + true true @@ -1943,21 +1898,6 @@ vars.put("deployState", deployState); - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} - PUT - true - false - true - false - false - false - false - 6 - false - 0 @@ -1980,25 +1920,18 @@ vars.put("deployState", deployState); - false - - - + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} - GET true - false + GET true - false - false - false - false - 6 - false - 0 + false + + + @@ -2020,26 +1953,19 @@ vars.put("deployState", deployState); - - false - - - + + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/prometheus - GET true - false + GET true - false - false - false - false - 6 - false - 0 + false + + + @@ -2070,7 +1996,7 @@ if (prev.getResponseCode() == '200') { assert res.contains("http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"POST\",outcome=\"SUCCESS\",status=\"201\",uri=\"/v2/compositions\",}") assert res.contains("http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"PUT\",outcome=\"SUCCESS\",status=\"202\",uri=\"/v2/compositions/{compositionId}\",}") - assert res.contains("http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"/v2/compositions/{compositionId}\",}") + assert res.contains("http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"/v2/compositions/{compositionId}\",}") assert res.contains("http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"POST\",outcome=\"SUCCESS\",status=\"201\",uri=\"/v2/compositions/{compositionId}/instances\",}") assert res.contains("http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"PUT\",outcome=\"SUCCESS\",status=\"202\",uri=\"/v2/compositions/{compositionId}/instances/{instanceId}\",}") @@ -2097,26 +2023,19 @@ if (prev.getResponseCode() == '200') { - - false - - - + + 6 ${POLICY_PARTICIPANT_HOST} ${POLICY_PARTICIPANT_HOST_PORT} http /onap/policyparticipant/prometheus - GET true - false + GET true - false - false - false - false - 6 - false - 0 + false + + + @@ -2166,17 +2085,14 @@ if (prev.getResponseCode() == '200') { + 1 + 1 + true stoptest - + 1 false - 1 - 1 - false - - - true @@ -2196,25 +2112,18 @@ vars.put("deployState", deployState); - false - - - + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} - GET true - false + GET true - false - false - false - false - 6 - false - 0 + false + + + @@ -2242,6 +2151,14 @@ vars.put("deployState", deployState); + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + true + PUT + true true @@ -2255,21 +2172,6 @@ vars.put("deployState", deployState); - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} - PUT - true - false - true - false - false - false - false - 6 - false - 0 @@ -2290,25 +2192,18 @@ vars.put("deployState", deployState); - false - - - + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} - DELETE true - false + DELETE true - false - false - false - false - 6 - false - 0 + false + + + @@ -2327,6 +2222,14 @@ vars.put("deployState", deployState); + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId} + true + PUT + true true @@ -2339,21 +2242,6 @@ vars.put("deployState", deployState); - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions/${compositionId} - PUT - true - false - true - false - false - false - false - 6 - false - 0 @@ -2376,6 +2264,14 @@ vars.put("deployState", deployState); + 6 + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId} + true + GET + true true @@ -2388,21 +2284,6 @@ vars.put("deployState", deployState); - ${RUNTIME_HOST} - ${RUNTIME_PORT} - http - /onap/policy/clamp/acm/v2/compositions/${compositionId} - GET - true - false - true - false - false - false - false - 6 - false - 0 @@ -2426,25 +2307,18 @@ vars.put("deployState", deployState); - false - - - + 6 ${RUNTIME_HOST} ${RUNTIME_PORT} http /onap/policy/clamp/acm/v2/compositions/${compositionId} - DELETE true - false + DELETE true - false - false - false - false - 6 - false - 0 + false + + +