Skip to content

Commit

Permalink
Adding tests for running image
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Van Fleet committed Aug 9, 2016
1 parent d995a2c commit d359108
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/image.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" != '' ]
Expand Down
15 changes: 15 additions & 0 deletions tests/running.bats
Original file line number Diff line number Diff line change
@@ -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" != '' ]
}

0 comments on commit d359108

Please sign in to comment.