diff --git a/test/alpine.bats b/test/alpine.bats new file mode 100644 index 0000000..6c773f9 --- /dev/null +++ b/test/alpine.bats @@ -0,0 +1,15 @@ +setup() { + docker history alpine >/dev/null 2>&1 +} + +@test "whoami" { + run docker run alpine whoami + [ $status -eq 0 ] + [ "${lines[0]}" = "app" ] +} + +@test "workdir" { + run docker run alpine pwd + [ $status -eq 0 ] + [ "${lines[0]}" = "/app" ] +} diff --git a/test/debian.bats b/test/debian.bats new file mode 100644 index 0000000..a5e7508 --- /dev/null +++ b/test/debian.bats @@ -0,0 +1,16 @@ +setup() { + docker history debian >/dev/null 2>&1 +} + +@test "whoami app" { + run docker run debian whoami + [ $status -eq 0 ] + [ "${lines[0]}" = "app" ] +} + +@test "workdir" { + run docker run debian pwd + [ $status -eq 0 ] + [ "${lines[0]}" = "/app" ] +} + diff --git a/test/ubuntu.bats b/test/ubuntu.bats new file mode 100644 index 0000000..59d04b9 --- /dev/null +++ b/test/ubuntu.bats @@ -0,0 +1,16 @@ +setup() { + docker history ubuntu >/dev/null 2>&1 +} + +@test "whoami app" { + run docker run ubuntu whoami + [ $status -eq 0 ] + [ "${lines[0]}" = "app" ] +} + +@test "workdir" { + run docker run ubuntu pwd + [ $status -eq 0 ] + [ "${lines[0]}" = "/app" ] +} +