Skip to content

Commit

Permalink
Update cleanup part of run_test.sh
Browse files Browse the repository at this point in the history
Signed-off-by: noobwei <[email protected]>
  • Loading branch information
noobwei committed Jul 29, 2024
1 parent 88b9b76 commit 0fd7692
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions test/e2e/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,11 @@ function cleanup_kind_cluster() {
}

function cleanup_docker_registry() {
local REG_NAME="${KIND_REGISTRY_NAME:-kind-registry}"
echo "Stopping Docker registry named '${KIND_REGISTRY_NAME}'..."
docker stop "${KIND_REGISTRY_NAME}" || echo "Failed to stop or no such registry '${KIND_REGISTRY_NAME}'."

echo "Stopping Docker registry named '${REG_NAME}'..."
docker stop "${REG_NAME}" || echo "Failed to stop or no such registry '${REG_NAME}'."

echo "Removing Docker registry named '${REG_NAME}'..."
docker rm "${REG_NAME}" || echo "Failed to remove or no such registry '${REG_NAME}'."
echo "Removing Docker registry named '${KIND_REGISTRY_NAME}'..."
docker rm "${KIND_REGISTRY_NAME}" || echo "Failed to remove or no such registry '${KIND_REGISTRY_NAME}'."
}

while (( "$#" )); do
Expand All @@ -225,15 +223,7 @@ while (( "$#" )); do
IPV6=true
shift
;;
--cleanup-kind)
CLEANUP_KIND=true
shift
;;
--cleanup-registry)
CLEANUP_REGISTRY=true
shift
;;
--cleanup-all)
--cleanup)
CLEANUP_KIND=true
CLEANUP_REGISTRY=true
shift
Expand Down

0 comments on commit 0fd7692

Please sign in to comment.