From 5b29cd5b10b62be21137d79bf75fe7aad245327b Mon Sep 17 00:00:00 2001 From: Demian Ginther <st.diluted@gmail.com> Date: Mon, 11 Mar 2019 20:06:31 -0600 Subject: [PATCH] Update 1_host_configuration.sh Signed-off-by: Demian Ginther <st.diluted@gmail.com> --- tests/1_host_configuration.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/tests/1_host_configuration.sh b/tests/1_host_configuration.sh index 3ecb844..ced4511 100644 --- a/tests/1_host_configuration.sh +++ b/tests/1_host_configuration.sh @@ -18,14 +18,26 @@ check_1_1() { totalChecks=$((totalChecks + 1)) - if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then - pass "$check_1_1" - resulttestjson "PASS" - currentScore=$((currentScore + 1)) + if [[ "$(docker info -f '{{ .SecurityOptions }}')" =~ .*userns.* ]]; then + if mountpoint -q -- "$(dirname "$(docker info -f '{{ .DockerRootDir }}')")" >/dev/null 2>&1; then + pass "$check_1_1" + resulttestjson "PASS" + currentScore=$((currentScore + 1)) + else + warn "$check_1_1" + resulttestjson "WARN" + currentScore=$((currentScore - 1)) + fi else - warn "$check_1_1" - resulttestjson "WARN" - currentScore=$((currentScore - 1)) + if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then + pass "$check_1_1" + resulttestjson "PASS" + currentScore=$((currentScore + 1)) + else + warn "$check_1_1" + resulttestjson "WARN" + currentScore=$((currentScore - 1)) + fi fi }