blob: e010fdd7c85f5f0b7ad25bb2d572f6a46adb735a [file] [log] [blame]
lukegleesonfa389b52021-07-05 14:59:49 +01001# ============LICENSE_START=======================================================
2# Copyright (c) 2021 Pantheon.tech.
puthuparambil.adityab46d1372021-07-09 12:51:10 +01003# Modifications Copyright (c) 2021 Bell Canada.
halil.cakal2dce7ab2024-01-10 11:32:59 +00004# Modifications Copyright (C) 2024 Nordix Foundation
lukegleesonfa389b52021-07-05 14:59:49 +01005# ================================================================================
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 Kashapovaad22402021-02-23 10:08:00 +020021*** Settings ***
halil.cakal2dce7ab2024-01-10 11:32:59 +000022Documentation CPS - Actuator and Swagger UI endpoints
Ruslan Kashapovd44fcee2021-02-26 11:42:29 +020023
24Library Collections
25Library RequestsLibrary
26
halil.cakal2dce7ab2024-01-10 11:32:59 +000027Suite Setup Create Session CPS_URL http://${CPS_CORE_HOST}:${CPS_CORE_PORT}
Ruslan Kashapovaad22402021-02-23 10:08:00 +020028
29*** Variables ***
halil.cakal2dce7ab2024-01-10 11:32:59 +000030${actuatorPath} /actuator/health
31${swaggerPath} /swagger-ui/index.html
Ruslan Kashapovaad22402021-02-23 10:08:00 +020032
Ruslan Kashapovaad22402021-02-23 10:08:00 +020033
34*** Test Cases ***
halil.cakal2dce7ab2024-01-10 11:32:59 +000035
Nagendra90287055edff2022-01-24 14:50:15 +053036Test CPS Enhanced Healthcheck
halil.cakal2dce7ab2024-01-10 11:32:59 +000037 [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
43Test CPS Swagger UI
44 [Documentation] Runs health check for CPS Swagger UI. If the CPS Swagger URL is accessible, status should be 200.
waqas.ikram7a397ca2024-01-25 11:36:16 +000045 GET On Session CPS_URL ${swaggerPath} expected_status=200