Skip to content

Commit

Permalink
fix failing tofu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktorn committed Dec 20, 2024
1 parent efddd1c commit a8a6c57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/examples/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

import json
import re
import os
import shutil
import subprocess
import tempfile
Expand Down Expand Up @@ -101,8 +101,9 @@ def _test_terraform_example(plan_validator, example):

# TODO(jccb): this should probably be done in check_documentation
# but we already have all the data here.
binary = os.environ.get('TERRAFORM', 'terraform')
result = subprocess.run(
'terraform fmt -check -diff -no-color main.tf'.split(), cwd=tmp_path,
f'{binary} fmt -check -diff -no-color main.tf'.split(), cwd=tmp_path,
stdout=subprocess.PIPE, encoding='utf-8')
assert result.returncode == 0, f'terraform code not formatted correctly\n{result.stdout}'

Expand Down

0 comments on commit a8a6c57

Please sign in to comment.