From: danielhanrahan Date: Fri, 16 Aug 2024 13:49:51 +0000 (+0100) Subject: [k6] Fix teardown script shutting down all containers X-Git-Tag: 3.5.2~10^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F78%2F138778%2F2;p=cps.git [k6] Fix teardown script shutting down all containers The teardown script in k6 shuts down ALL docker containers when done. This can cause failures in the groovy tests when running in parallel, as the groovy test container for DB also shuts down. This fix is to shut down using docker-compose. Issue-ID: CPS-2367 Signed-off-by: danielhanrahan Change-Id: Ic55ca6396dfc3170e4a326f34214d3a819977f50 --- diff --git a/k6-tests/teardown.sh b/k6-tests/teardown.sh index 45422f9d12..1b4d721a23 100755 --- a/k6-tests/teardown.sh +++ b/k6-tests/teardown.sh @@ -18,11 +18,5 @@ echo '================================== docker info ==========================' docker ps -a -echo 'Stopping, Removing all running containers...' -docker stop $(docker ps -aq) && docker rm $(docker ps -aq) - -echo 'Removing Volumes...' -docker volume prune -f - -echo 'Removing Networks...' -docker network prune -f +echo 'Stopping, Removing containers and volumes...' +docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub down --volumes