diff --git a/test/alpine.bats b/test/alpine.bats index 2f39499..b80c6d9 100644 --- a/test/alpine.bats +++ b/test/alpine.bats @@ -8,6 +8,18 @@ setup() { [ "${lines[0]}" = "app" ] } +@test "uid" { + run docker run virtualroot/hardened-alpine:3.18 id -g + [ $status -eq 0 ] + [ "${lines[0]}" = "12123" ] +} + +@test "gid" { + run docker run virtualroot/hardened-alpine:3.18 id -g + [ $status -eq 0 ] + [ "${lines[0]}" = "12123" ] +} + @test "workdir" { run docker run virtualroot/hardened-alpine:3.18 pwd [ $status -eq 0 ] diff --git a/test/debian.bats b/test/debian.bats index ee1b875..04f5dba 100644 --- a/test/debian.bats +++ b/test/debian.bats @@ -8,6 +8,18 @@ setup() { [ "${lines[0]}" = "app" ] } +@test "uid" { + run docker run virtualroot/hardened-debian:12 id -g + [ $status -eq 0 ] + [ "${lines[0]}" = "12123" ] +} + +@test "gid" { + run docker run virtualroot/hardened-debian:12 id -g + [ $status -eq 0 ] + [ "${lines[0]}" = "12123" ] +} + @test "workdir" { run docker run virtualroot/hardened-debian:12 pwd [ $status -eq 0 ] diff --git a/test/ubuntu.bats b/test/ubuntu.bats index bd56c05..1cc42a9 100644 --- a/test/ubuntu.bats +++ b/test/ubuntu.bats @@ -8,6 +8,18 @@ setup() { [ "${lines[0]}" = "app" ] } +@test "uid" { + run docker run virtualroot/hardened-ubuntu:22.04 id -g + [ $status -eq 0 ] + [ "${lines[0]}" = "12123" ] +} + +@test "gid" { + run docker run virtualroot/hardened-ubuntu:22.04 id -g + [ $status -eq 0 ] + [ "${lines[0]}" = "12123" ] +} + @test "workdir" { run docker run virtualroot/hardened-ubuntu:22.04 pwd [ $status -eq 0 ]