Commit b6ed6844 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

test: remove jq requirement

parent 5e0da211
...@@ -20,7 +20,6 @@ running on Mac OS X, most of these are available with `brew`: ...@@ -20,7 +20,6 @@ running on Mac OS X, most of these are available with `brew`:
* [Bats](https://github.com/sstephenson/bats) * [Bats](https://github.com/sstephenson/bats)
* [AWS cli](http://aws.amazon.com/cli/) * [AWS cli](http://aws.amazon.com/cli/)
* [jq](http://stedolan.github.io/jq/)
## Configuring Tests ## Configuring Tests
......
# Let's verify that the tools we need are installed # Let's verify that the tools we need are installed
declare -a required=(aws jq) declare -a required=(aws)
for cmd in "${required[@]}"; do for cmd in "${required[@]}"; do
command -v $cmd >/dev/null 2>&1 || { command -v $cmd >/dev/null 2>&1 || {
echo "'$cmd' must be installed" >&2 echo "'$cmd' must be installed" >&2
...@@ -40,8 +40,8 @@ fixtures() { ...@@ -40,8 +40,8 @@ fixtures() {
# This deletes any AMIs with a tag "packer-test" of "true" # This deletes any AMIs with a tag "packer-test" of "true"
aws_ami_cleanup() { aws_ami_cleanup() {
local region=${1:-us-east-1} local region=${1:-us-east-1}
aws ec2 describe-images --region ${region} --owners self --output json \ aws ec2 describe-images --region ${region} --owners self --output text \
--filters 'Name=tag:packer-test,Values=true' \ --filters 'Name=tag:packer-test,Values=true' \
| jq -r -M '.Images[]["ImageId"]' \ --query 'Images[*].ImageId' \
| xargs -n1 aws ec2 deregister-image --region ${region} --image-id | xargs -n1 aws ec2 deregister-image --region ${region} --image-id
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment