From f99837b4b76928714d5cc589d90a87de7d4d7cbd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 14 Dec 2013 11:40:27 -0800 Subject: [PATCH] test: fix GCE test --- test/builder_googlecompute.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/builder_googlecompute.bats b/test/builder_googlecompute.bats index 7287f9cce..2c1ad8ab0 100755 --- a/test/builder_googlecompute.bats +++ b/test/builder_googlecompute.bats @@ -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() { @@ -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 ] }