Skip to content

Commit

Permalink
test: fix GCE test
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Dec 14, 2013
1 parent 044e7fa commit f99837b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/builder_googlecompute.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ USER_VARS="${USER_VARS} -var project_id=${GC_PROJECT_ID}"
# This tests if GCE has an image that contains the given parameter.
gc_has_image() {
gcutil --format=names --project=${GC_PROJECT_ID} listimages \
| grep $1
| grep $1 | wc -l
}

teardown() {
Expand All @@ -36,5 +36,5 @@ teardown() {
@test "googlecompute: build minimal.json" {
run packer build ${USER_VARS} $FIXTURE_ROOT/minimal.json
[ "$status" -eq 0 ]
[ "$(gc_has_image "packerbats-minimal")" -eq 0 ]
[ "$(gc_has_image "packerbats-minimal")" -eq 1 ]
}

0 comments on commit f99837b

Please sign in to comment.