From 4f483276cfe5261f0e1e15115bcf029785470479 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 17 Dec 2018 14:26:03 +0000 Subject: [PATCH] e2e: assign a default value of 0 to `DOCKERD_EXPERIMENTAL` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently running the e2e tests produces a warning/error: $ make -f docker.Makefile test-e2e «...» docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker-cli-e2e ./scripts/test/e2e/run: line 20: test: : integer expression expected This is from: test "${DOCKERD_EXPERIMENTAL:-}" -eq "1" && «...» Where `${DOCKERD_EXPERIMENTAL:-}` expands to the empty string, resulting in `test "" -eq "1"` which produces the warning. This error is enough to trigger the short-circuiting behaviour of `&&` so the result is as expected, but fix the issue nonetheless by provdiing a default `0`. Signed-off-by: Ian Campbell --- scripts/test/e2e/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/e2e/run b/scripts/test/e2e/run index 2b718e52f1..7a401db9ce 100755 --- a/scripts/test/e2e/run +++ b/scripts/test/e2e/run @@ -17,7 +17,7 @@ function setup { local project=$1 local file=$2 - test "${DOCKERD_EXPERIMENTAL:-}" -eq "1" && file="${file}:./e2e/compose-env.experimental.yaml" + test "${DOCKERD_EXPERIMENTAL:-0}" -eq "1" && file="${file}:./e2e/compose-env.experimental.yaml" if [[ "${TEST_CONNHELPER:-}" = "ssh" ]];then test ! -f "${HOME}/.ssh/id_rsa" && ssh-keygen -t rsa -C docker-e2e-dummy -N "" -f "${HOME}/.ssh/id_rsa" -q