diff --git a/tests/image.bats b/tests/image.bats index cc1db3d..b52fe41 100755 --- a/tests/image.bats +++ b/tests/image.bats @@ -2,15 +2,6 @@ load ../common -setup() { - ./bin/rebuild.sh -} - -@test "Should be buildable" { - run bin/build.sh - [ "$status" -eq 0 ] -} - @test "Concludes first-run experience" { result="$(docker run -i $maintainer/$imagename find /tmp/firsttimerunning)" [ "$result" != '' ] diff --git a/tests/running.bats b/tests/running.bats new file mode 100644 index 0000000..b592d41 --- /dev/null +++ b/tests/running.bats @@ -0,0 +1,15 @@ +#!/usr/bin/env bats + +load ../common + +# These tests assume the pipeline will start and stop the container. + +@test "Leaves running process" { + result="$(docker ps | grep $imagename)" + [ "$result" != '' ] +} + +@test "Exposes running HTTP service" { + result="$(docker exec -i $imagename curl http://localhost/)" + [ "$result" != '' ] +} \ No newline at end of file