summaryrefslogtreecommitdiffstats
path: root/csit
diff options
context:
space:
mode:
Diffstat (limited to 'csit')
-rw-r--r--csit/api/tests/api-test.robot2
-rw-r--r--csit/common-library.robot4
-rw-r--r--csit/config/pap/papParameters.yaml2
-rw-r--r--csit/pap/tests/pap-test.robot14
4 files changed, 12 insertions, 10 deletions
diff --git a/csit/api/tests/api-test.robot b/csit/api/tests/api-test.robot
index d9ca2a97..37a06e85 100644
--- a/csit/api/tests/api-test.robot
+++ b/csit/api/tests/api-test.robot
@@ -114,7 +114,7 @@ DeleteSpecificPolicyTypeV3
Metrics
[Documentation] Verify policy-api is exporting prometheus metrics
${auth}= PolicyAdminAuth
- ${resp}= GetMetrics ${POLICY_API_IP} ${auth}
+ ${resp}= GetMetrics ${POLICY_API_IP} ${auth} /
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/healthcheck",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/statistics",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes",} 1.0
diff --git a/csit/common-library.robot b/csit/common-library.robot
index 42d3ed12..95831b0d 100644
--- a/csit/common-library.robot
+++ b/csit/common-library.robot
@@ -113,9 +113,9 @@ QueryPolicyStatus
Should Be Equal As Strings ${responseEntry['state']} SUCCESS
GetMetrics
- [Arguments] ${hostname} ${auth}
+ [Arguments] ${hostname} ${auth} ${context_path}
Log Creating session http://${hostname}:6969
${session}= Create Session policy http://${hostname}:6969 auth=${auth}
- ${resp}= GET On Session policy /metrics expected_status=200
+ ${resp}= GET On Session policy ${context_path}metrics expected_status=200
Log Received response from policy ${resp.text}
[return] ${resp}
diff --git a/csit/config/pap/papParameters.yaml b/csit/config/pap/papParameters.yaml
index 330feee8..cc59dda5 100644
--- a/csit/config/pap/papParameters.yaml
+++ b/csit/config/pap/papParameters.yaml
@@ -23,6 +23,8 @@ spring:
server:
port: 6969
+ servlet:
+ context-path: /policy/pap/v1
ssl:
enabled: false
diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot
index 8bf32300..624a4150 100644
--- a/csit/pap/tests/pap-test.robot
+++ b/csit/pap/tests/pap-test.robot
@@ -41,12 +41,12 @@ Consolidated Healthcheck
Metrics
[Documentation] Verify policy pap is exporting prometheus metrics
${auth}= PolicyAdminAuth
- ${resp}= GetMetrics ${POLICY_PAP_IP} ${auth}
- Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/healthcheck",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/components/healthcheck",} 1.0
- Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",} 1.0
- Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findByKeyName",repository="PdpGroupRepository",state="SUCCESS",} 1.0
- Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS",} 1.0
+ ${resp}= GetMetrics ${POLICY_PAP_IP} ${auth} /policy/pap/v1/
+ Should Contain ${resp.text} tomcat_sessions_active_current_sessions
+ Should Contain ${resp.text} jdbc_connections_idle{name="dataSource",}
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",}
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findByKeyName",repository="PdpGroupRepository",state="SUCCESS",}
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS",}
Statistics
[Documentation] Verify policy pap statistics
@@ -106,7 +106,7 @@ QueryPdpGroupsAfterUndeploy
QueryPolicyAuditAfterUnDeploy
[Documentation] Verify policy audit record after undeploy
- Sleep 130 seconds
+ Sleep 20 seconds
QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeA onap.restart.tca UNDEPLOYMENT
QueryPolicyAuditWithMetadataSetAfterUnDeploy
color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ============LICENSE_START=======================================================
  Copyright (C) 2020 Pantheon.tech
  Modifications Copyright (C) 2023 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=========================================================
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.onap.cps</groupId>
    <artifactId>checkstyle</artifactId>
    <version>3.4.6-SNAPSHOT</version>

    <profiles>
        <profile>
            <id>Windows</id>
            <activation>
                <os>
                    <family>Windows</family>
                </os>
            </activation>
            <properties>
                <script.executor>python</script.executor>
            </properties>
        </profile>
        <profile>
            <id>unix</id>
            <activation>
                <os>
                    <family>unix</family>
                </os>
            </activation>
            <properties>
                <script.executor>python3</script.executor>
            </properties>
        </profile>
    </profiles>

    <properties>
        <nexusproxy>https://nexus.onap.org</nexusproxy>
        <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
        <sonar.skip>true</sonar.skip>
        <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
                <executions>
                    <execution>
                        <id>copyright-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>${script.executor}</executable>
                            <workingDirectory>../checkstyle/src/main/</workingDirectory>
                            <arguments>
                                <argument>CopyrightCheck.py</argument>
                                <argument>resources/project-committers-config.csv</argument>
                                <argument>resources/copyright-template.txt</argument>
                                <argument>resources/ignore-files-config.csv</argument>
                            </arguments>
                            <successCodes>
                                <successCode>0</successCode>
                                <successCode>1</successCode>
                            </successCodes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>ecomp-releases</id>
            <name>ECOMP Release Repository</name>
            <url>${nexusproxy}${releaseNexusPath}</url>
        </repository>
        <snapshotRepository>
            <id>ecomp-snapshots</id>
            <name>ECOMP Snapshot Repository</name>
            <url>${nexusproxy}${snapshotNexusPath}</url>
        </snapshotRepository>
    </distributionManagement>
</project>