blob: 8445d7383f73c5238f2b9e087fb07ea8bd88853f [file] [log] [blame]
Suchitra Vemuri270398d2018-01-25 23:36:30 -08001# Copyright 2017-present Radisys Corporation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15
16*** Settings ***
17Documentation Test suite for checking results collected by various commands on the soak server
18Library OperatingSystem
19Library ../cord-api/Framework/utils/onosUtils.py
20Library ../cord-api/Framework/utils/utils.py
21
22*** Variables ***
23${FILE_PATH} ${CURDIR}
24
25*** Test Cases ***
26Verify Docker Containers Restart Status
27 [Documentation] Verify that no containers have been restarted
28 ${command_output}= Run docker inspect --format "ID: {{.ID}} RESTARTS: {{.RestartCount}} NAME: {{.Name}}" $(docker ps -aq) | grep -v ": 0"
29 Log ${command_output}
30 Should Be Empty ${command_output}
31
32Verify Memory Utilization on the Containers
33 [Documentation] Display the memory utilization for the containers
34 ${command_output}= Run docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}" $(docker ps -a --format '{{.Names}}') > ${FILE_PATH}/file.txt
35 ${cat_output}= Run cat ${FILE_PATH}/file.txt
36 ${count}= Run cat ${FILE_PATH}/file.txt | wc -l
37 Should Not Be Empty ${count}