aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2023-08-19 02:01:50 +0300
committerGitHub <noreply@github.com>2023-08-19 02:01:50 +0300
commita4b31f314fa1385950a9dbc81682d9acb2e2fba9 (patch)
tree75bf2f793d346389c1c4031e81ad756b7a870b4b /test
parent9fd5daf06b40794a067c4cdbb8e258d99eeefc24 (diff)
[docker-in-docker] Reverts the retry logic (#659)feature_docker-in-docker_2.3.1
* Update install.sh * [docker-in-docker] Update retry logic * revert the retry logic!
Diffstat (limited to 'test')
-rw-r--r--test/docker-in-docker/docker_retry.sh32
-rw-r--r--test/docker-in-docker/scenarios.json6
-rw-r--r--test/docker-in-docker/test-scripts/docker-test-init.sh26
3 files changed, 0 insertions, 64 deletions
diff --git a/test/docker-in-docker/docker_retry.sh b/test/docker-in-docker/docker_retry.sh
deleted file mode 100644
index cc35fbb..0000000
--- a/test/docker-in-docker/docker_retry.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Optional: Import test library
-source dev-container-features-test-lib
-
-# Definition specific tests
-check "docker-buildx" docker buildx version
-check "docker-ps" docker ps
-
-sleep 5s
-
-# Stop docker
-pkill dockerd
-pkill containerd
-
-sleep 5s
-
-set +e
- docker_ok_code="$(docker info > /dev/null 2>&1; echo $?)"
-set -e
-
-check "docker-not-running" bash -c "[[ ${docker_ok_code} == 1 ]]"
-
-# Testing retry logic
-./test-scripts/docker-test-init.sh
-
-check "docker-started-after-retries" docker ps
-
-# Report result
-reportResults
diff --git a/test/docker-in-docker/scenarios.json b/test/docker-in-docker/scenarios.json
index 525ce69..de4e7d6 100644
--- a/test/docker-in-docker/scenarios.json
+++ b/test/docker-in-docker/scenarios.json
@@ -67,11 +67,5 @@
}
},
"remoteUser": "node"
- },
- "docker_retry": {
- "image": "ubuntu:focal",
- "features": {
- "docker-in-docker": {}
- }
}
}
diff --git a/test/docker-in-docker/test-scripts/docker-test-init.sh b/test/docker-in-docker/test-scripts/docker-test-init.sh
deleted file mode 100644
index b213fb4..0000000
--- a/test/docker-in-docker/test-scripts/docker-test-init.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#-------------------------------------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
-#-------------------------------------------------------------------------------------------------------------
-
-retry_count=0
-docker_ok="false"
-
-until [ "${docker_ok}" = "true" ] || [ "${retry_count}" -eq "5" ];
-do
- if [ "${retry_count}" -eq "3" ]; then
- echo "Starting docker after 3 retries..."
- /usr/local/share/docker-init.sh
- fi
-
- set +e
- docker info > /dev/null 2>&1 && docker_ok="true"
-
- if [ "${docker_ok}" != "true" ]; then
- echo "(*) Failed to start docker, retrying in 5s... Retry count: ${retry_count}"
- retry_count=`expr $retry_count + 1`
- sleep 1s
- fi
- set -e
-done \ No newline at end of file