diff --git a/tests/4_container_images.sh b/tests/4_container_images.sh index cd849f6..8a70ace 100644 --- a/tests/4_container_images.sh +++ b/tests/4_container_images.sh @@ -23,7 +23,7 @@ else user=`printf "$c" | cut -d ":" -f 2` container_id=`printf "$c" | cut -d ":" -f 1` - if test $user = "User=" || test $user = "User="; then + if test $user = "User=" || test $user = "User=[]" ||test $user = "User="; then # If it's the first container, fail the test if [ $fail -eq 0 ]; then warn "$check_4_1" diff --git a/tests/5_container_runtime.sh b/tests/5_container_runtime.sh index f9a3dcd..0f010b2 100644 --- a/tests/5_container_runtime.sh +++ b/tests/5_container_runtime.sh @@ -23,7 +23,7 @@ else policy=`printf "$c" | cut -d ":" -f 2` container_id=`printf "$c" | cut -d ":" -f 1` - if test $policy = "AppArmorProfile=" || test $policy = "AppArmorProfile="; then + if test $policy = "AppArmorProfile=" || test $policy = "AppArmorProfile=[]" ||test $policy = "AppArmorProfile="; then # If it's the first container, fail the test if [ $fail -eq 0 ]; then warn "$check_5_1" @@ -50,7 +50,7 @@ else policy=`printf "$c" | cut -d ":" -f 2` container_id=`printf "$c" | cut -d ":" -f 1` - if test $policy = "SecurityOpt=" || test $policy = "SecurityOpt="; then + if test $policy = "SecurityOpt=" || test $policy = "SecurityOpt=[]" || test $policy = "SecurityOpt="; then # If it's the first container, fail the test if [ $fail -eq 0 ]; then warn "$check_5_2" @@ -103,7 +103,7 @@ else for c in $cont_inspect; do caps=`printf "$c" | cut -d ":" -f 2` container_id=`printf "$c" | cut -d ":" -f 1` - if test $caps != "CapAdd=" && test $caps != "CapAdd="; then + if test $caps != "CapAdd=" && test $caps != "CapAdd=[]" && test $caps != "CapAdd="; then # If it's the first container, fail the test if [ $fail -eq 0 ]; then warn "$check_5_4" @@ -456,7 +456,7 @@ else for c in $cont_inspect; do mode=`printf "$c" | cut -d ":" -f 2` container_id=`printf "$c" | cut -d ":" -f 1` - if test $mode != "Devices=[]" && test $mode != "Devices="; then + if test $mode != "Devices=" && test $mode != "Devices=[]" && test $mode != "Devices="; then # If it's the first container, fail the test if [ $fail -eq 0 ]; then info "$check_5_18" @@ -481,7 +481,7 @@ else for c in $cont_inspect; do mode=`printf "$c" | cut -d ":" -f 2` container_id=`printf "$c" | cut -d ":" -f 1` - if test $mode = "Ulimits=" || test $mode = "Ulimits="; then + if test $mode = "Ulimits=" || test $mode = "Ulimits=[]" || test $mode = "Ulimits="; then # If it's the first container, fail the test if [ $fail -eq 0 ]; then info "$check_5_19"