Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Oct 29, 2023
1 parent 394520a commit 283a145
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ jobs:
exit 1
fi
if [[ "${{ steps.tofu-version.outputs.tofu }}" != "1.6.0-alpha3" ]]; then
if [[ "${{ steps.terraform-version.outputs.tofu }}" != "1.6.0-alpha3" ]]; then
echo "::error:: Terraform version not set from OPENTOFU_VERSION"
exit 1
fi
Expand Down Expand Up @@ -715,11 +715,11 @@ jobs:
path: tests/workflows/test-version/empty

- name: Print the version
run: echo "The terraform version was ${{ steps.terraform-version.outputs.terraform }}"
run: echo "The terraform version was ${{ steps.tofu-version.outputs.terraform }}"

- name: Check the version
run: |
if [[ "${{ steps.terraform-version.outputs.terraform }}" != *"1.5"* ]]; then
if [[ "${{ steps.tofu-version.outputs.terraform }}" != *"1.5"* ]]; then
echo "::error:: Terraform version not selected"
exit 1
fi
2 changes: 2 additions & 0 deletions image/actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ function detect-terraform-version() {
TERRAFORM_VER_MINOR=$(echo "$TF_VERSION" | cut -d. -f2)
TERRAFORM_VER_PATCH=$(echo "$TF_VERSION" | cut -d. -f3)

terraform version

if terraform version | grep --quiet OpenTofu; then
export TOOL_PRODUCT_NAME="OpenTofu"
export TOOL_COMMAND_NAME="tofu"
Expand Down

0 comments on commit 283a145

Please sign in to comment.