1 # ============LICENSE_START=======================================================
2 # Copyright (c) 2021 Pantheon.tech.
3 # Modifications Copyright (c) 2021 Bell Canada.
4 # Modifications Copyright (C) 2024 Nordix Foundation
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
22 Documentation CPS - Actuator and Swagger UI endpoints
25 Library RequestsLibrary
27 Suite Setup Create Session CPS_URL http://${CPS_CORE_HOST}:${CPS_CORE_PORT}
30 ${actuatorPath} /actuator/health
31 ${swaggerPath} /swagger-ui/index.html
36 Test CPS Enhanced Healthcheck
37 [Documentation] Runs CPS Health Check. It will check for overall status update of CPS component like, Database and diskspace status along with liveliness and readiness check
38 ${response}= GET On Session CPS_URL ${actuatorPath} expected_status=200
39 ${resp_body}= Convert to string ${response.text}
40 Should Contain ${resp_body} UP
41 Should Not Contain ${resp_body} DOWN
44 [Documentation] Runs health check for CPS Swagger UI. If the CPS Swagger URL is accessible, status should be 200.
45 GET On Session CPS_URL ${swaggerPath} expected_status=200