aboutsummaryrefslogtreecommitdiffstats
path: root/csit/run-project-csit.sh
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-02-09 11:56:27 +0000
committeradheli.tavares <adheli.tavares@est.tech>2023-02-14 15:52:04 +0000
commit9fc9fa480d5b18b0988b9388d13db8328032fc52 (patch)
tree4d851a64d6593335e7c02a5267875833a04e9591 /csit/run-project-csit.sh
parentf5a11b0b346df610ffa8d9857956abf113ce6765 (diff)
Add SLAs validations to docker csit robot tests
Issue-ID: POLICY-4529 Change-Id: I197a51892e9135d20c2e8a49ce7787df3bfbd4fa Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'csit/run-project-csit.sh')
-rwxr-xr-xcsit/run-project-csit.sh18
1 files changed, 7 insertions, 11 deletions
diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh
index a3837b03..0f15c75b 100755
--- a/csit/run-project-csit.sh
+++ b/csit/run-project-csit.sh
@@ -27,17 +27,18 @@
function on_exit(){
rc=$?
if [[ ${WORKSPACE} ]]; then
- if [[ ${WORKDIR} ]]; then
- rsync -av "${WORKDIR}/" "${WORKSPACE}/csit/archives/${PROJECT}"
- fi
# Record list of active docker containers
- docker ps
+ docker ps --format "table {{ .Names }}\t{{ .Status }}"
# Show the logs from all containers
- docker-compose -f "${WORKSPACE}/csit/docker-compose-all.yml" logs
+ docker-compose -f "${WORKSPACE}/csit/docker-compose-all.yml" logs > docker_compose.log
# show memory consumption after all docker instances initialized
docker_stats
+
+ if [[ ${WORKDIR} ]]; then
+ rsync -av "${WORKDIR}/" "${WORKSPACE}/csit/archives/${PROJECT}"
+ fi
fi
# Run teardown script plan if it exists
cd "${TESTPLANDIR}/plans/"
@@ -57,25 +58,20 @@ function docker_stats(){
# General memory details
if [ "$(uname -s)" == "Darwin" ]
then
- echo "> top -l1 | head -10"
sh -c "top -l1 | head -10"
echo
else
- echo "> top -bn1 | head -3"
sh -c "top -bn1 | head -3"
echo
- echo "> free -h"
sh -c "free -h"
echo
fi
# Memory details per Docker
- echo "> docker ps"
- docker ps
+ docker ps --format "table {{ .Names }}\t{{ .Status }}"
echo
- echo "> docker stats --no-stream"
docker stats --no-stream
echo
}