diff --git a/tests/5_container_runtime.sh b/tests/5_container_runtime.sh index 32fdab0..66f6b4f 100644 --- a/tests/5_container_runtime.sh +++ b/tests/5_container_runtime.sh @@ -61,7 +61,10 @@ else fail=0 for c in $containers; do - caps=$(docker inspect --format 'CapAdd={{ .HostConfig.CapAdd}}' "$c") + container_caps=$(docker inspect --format 'CapAdd={{ .HostConfig.CapAdd}}' "$c") + caps=$(echo "$container_caps" | tr "[:lower:]" "[:upper:]" | \ + sed 's/CAPADD/CapAdd/' | \ + sed -r "s/AUDIT_WRITE|CHOWN|DAC_OVERRIDE|FOWNER|FSETID|KILL|MKNOD|NET_BIND_SERVICE|NET_RAW|SETFCAP|SETGID|SETPCAP|SETUID|SYS_CHROOT|\s//g") if [ "$caps" != 'CapAdd=' -a "$caps" != 'CapAdd=[]' -a "$caps" != 'CapAdd=' -a "$caps" != 'CapAdd=' ]; then # If it's the first container, fail the test