Skip to content

Commit

Permalink
Skip test on darwin/arm64 as binary not available for random provider…
Browse files Browse the repository at this point in the history
… v2.2.1 (#302)
  • Loading branch information
bendbennett committed Sep 2, 2022
1 parent 7bb1edb commit 5b5e6b8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions internal/provider/resource_password_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"regexp"
"runtime"
"testing"

"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -506,17 +507,14 @@ func TestAccResourcePassword_Min(t *testing.T) {
})
}

// TestAccResourcePassword_UpgradeFromVersion2_2_1 requires that you are running an amd64 Terraform binary
// if you are running this test locally on arm64 architecture otherwise you will see the following error:
//
// Error: Incompatible provider version
//
// Provider registry.terraform.io/hashicorp/random v2.2.1 does not have a
// package available for your current platform ...
//
// TestAccResourcePassword_UpgradeFromVersion2_2_1 verifies behaviour when upgrading state from schema V0 to V2.
func TestAccResourcePassword_UpgradeFromVersion2_2_1(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() {
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
t.Skip("This test requires darwin/amd64 to download the old provider version. Setting TF_ACC_TERRAFORM_PATH to darwin/amd64 compatible Terraform binary can be used as a workaround.")
}
},
Steps: []resource.TestStep{
{
ExternalProviders: providerVersion221(),
Expand Down

0 comments on commit 5b5e6b8

Please sign in to comment.