[CORD-2471] soak test updates
Change-Id: I60c35903bfe05507958713a69ed9bbd4f9d67480
diff --git a/src/test/diag/verifySoakDiag.txt b/src/test/diag/verifySoakDiag.txt
index 8445d73..fd6c6db 100644
--- a/src/test/diag/verifySoakDiag.txt
+++ b/src/test/diag/verifySoakDiag.txt
@@ -20,18 +20,21 @@
Library ../cord-api/Framework/utils/utils.py
*** Variables ***
-${FILE_PATH} ${CURDIR}
+${FILE_PATH} /home/cord/SoakTest_Logs
*** Test Cases ***
Verify Docker Containers Restart Status
[Documentation] Verify that no containers have been restarted
- ${command_output}= Run docker inspect --format "ID: {{.ID}} RESTARTS: {{.RestartCount}} NAME: {{.Name}}" $(docker ps -aq) | grep -v ": 0"
+ [Tags] Restart_Status
+ ${command_output}= Run docker inspect --format "ID: {{.ID}} RESTARTS: {{.RestartCount}} NAME: {{.Name}}" $(docker ps -aq) | grep -v ": 0" > ${FILE_PATH}/container_restart_counts_$(date "+%Y.%m.%d-%H.%M.%S")
Log ${command_output}
- Should Be Empty ${command_output}
+ Should Be Empty ${command_output}
Verify Memory Utilization on the Containers
[Documentation] Display the memory utilization for the containers
- ${command_output}= Run docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}" $(docker ps -a --format '{{.Names}}') > ${FILE_PATH}/file.txt
- ${cat_output}= Run cat ${FILE_PATH}/file.txt
- ${count}= Run cat ${FILE_PATH}/file.txt | wc -l
+ [Tags] Container_Memory_Usage
+ ${command_output}= Run docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}" $(docker ps -a --format '{{.Names}}') > /tmp/mem_log
+ ${cat_output}= Run cat /tmp/mem_log
+ ${count}= Run cat /tmp/mem_log | wc -l
+ ${command_output1}= Run mv /tmp/mem_log ${FILE_PATH}/container_mem_usage_$(date "+%Y.%m.%d-%H.%M.%S")
Should Not Be Empty ${count}