Skip to content

Commit

Permalink
fix tests (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman authored Jun 16, 2020
1 parent 237e8e2 commit 0149341
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 94 deletions.
2 changes: 1 addition & 1 deletion test/terraform/input-descriptions.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function teardown() {

@test "check if terraform inputs have descriptions" {
skip_unless_terraform
terraform_docs json . > $TMPFILE
terraform-docs json . > $TMPFILE
run bash -c "jq -rS '.inputs[] | select (.description == \"\" or .description == null) | .name + \" is missing a description\"' < $TMPFILE"
log "$output"
[ -z "$output" ]
Expand Down
7 changes: 0 additions & 7 deletions test/terraform/lib.bash
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,3 @@ function clean() {
function skip_unless_terraform() {
[[ -n $(echo *.tf) ]] || skip "no *.tf files"
}

function terraform_docs() {
which awk 2>&1 >/dev/null || ( echo "awk not available"; exit 1)
which terraform 2>&1 >/dev/null || ( echo "terraform not available"; exit 1)
which terraform-docs 2>&1 >/dev/null || ( echo "terraform-docs not available"; exit 1)
terraform-docs --no-providers --no-header $1 $2
}
2 changes: 1 addition & 1 deletion test/terraform/output-descriptions.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function teardown() {

@test "check if terraform outputs have descriptions" {
skip_unless_terraform
terraform_docs json . > $TMPFILE
terraform-docs json . > $TMPFILE
run bash -c "jq -rS '.outputs[] | select (.description == \"\" or .description == null) | .name + \" is missing a description\"' < $TMPFILE"
log "$output"
[ -z "$output" ]
Expand Down
85 changes: 0 additions & 85 deletions test/terraform/terraform-docs.awk

This file was deleted.

0 comments on commit 0149341

Please sign in to comment.