lukegleeson | fa389b5 | 2021-07-05 14:59:49 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Copyright (c) 2021 Pantheon.tech. |
puthuparambil.aditya | b46d137 | 2021-07-09 12:51:10 +0100 | [diff] [blame] | 3 | # Modifications Copyright (c) 2021 Bell Canada. |
halil.cakal | 2dce7ab | 2024-01-10 11:32:59 +0000 | [diff] [blame] | 4 | # Modifications Copyright (C) 2024 Nordix Foundation |
lukegleeson | fa389b5 | 2021-07-05 14:59:49 +0100 | [diff] [blame] | 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 |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 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. |
| 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ============LICENSE_END========================================================= |
| 20 | |
Ruslan Kashapov | aad2240 | 2021-02-23 10:08:00 +0200 | [diff] [blame] | 21 | *** Settings *** |
halil.cakal | 2dce7ab | 2024-01-10 11:32:59 +0000 | [diff] [blame] | 22 | Documentation CPS - Actuator and Swagger UI endpoints |
Ruslan Kashapov | d44fcee | 2021-02-26 11:42:29 +0200 | [diff] [blame] | 23 | |
| 24 | Library Collections |
| 25 | Library RequestsLibrary |
| 26 | |
halil.cakal | 2dce7ab | 2024-01-10 11:32:59 +0000 | [diff] [blame] | 27 | Suite Setup Create Session CPS_URL http://${CPS_CORE_HOST}:${CPS_CORE_PORT} |
Ruslan Kashapov | aad2240 | 2021-02-23 10:08:00 +0200 | [diff] [blame] | 28 | |
| 29 | *** Variables *** |
halil.cakal | 2dce7ab | 2024-01-10 11:32:59 +0000 | [diff] [blame] | 30 | ${actuatorPath} /actuator/health |
| 31 | ${swaggerPath} /swagger-ui/index.html |
Ruslan Kashapov | aad2240 | 2021-02-23 10:08:00 +0200 | [diff] [blame] | 32 | |
Ruslan Kashapov | aad2240 | 2021-02-23 10:08:00 +0200 | [diff] [blame] | 33 | |
| 34 | *** Test Cases *** |
halil.cakal | 2dce7ab | 2024-01-10 11:32:59 +0000 | [diff] [blame] | 35 | |
Nagendra90287 | 055edff | 2022-01-24 14:50:15 +0530 | [diff] [blame] | 36 | Test CPS Enhanced Healthcheck |
halil.cakal | 2dce7ab | 2024-01-10 11:32:59 +0000 | [diff] [blame] | 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 |
| 42 | |
| 43 | Test CPS Swagger UI |
| 44 | [Documentation] Runs health check for CPS Swagger UI. If the CPS Swagger URL is accessible, status should be 200. |
waqas.ikram | 7a397ca | 2024-01-25 11:36:16 +0000 | [diff] [blame] | 45 | GET On Session CPS_URL ${swaggerPath} expected_status=200 |