Skip to content

Commit

Permalink
Remove version formate validation (#1877)
Browse files Browse the repository at this point in the history
Merged PR #1877.
  • Loading branch information
chrisst authored and modular-magician committed Jun 5, 2019
1 parent 1ed2b8d commit 7c28bf7
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"regexp"
)

func TestAccTpuTensorflowVersions_basic(t *testing.T) {
Expand Down Expand Up @@ -54,14 +53,10 @@ func testAccCheckGoogleTpuTensorflowVersions(n string) resource.TestCheckFunc {

for i := 0; i < cnt; i++ {
idx := fmt.Sprintf("versions.%d", i)
v, ok := rs.Primary.Attributes[idx]
_, ok := rs.Primary.Attributes[idx]
if !ok {
return fmt.Errorf("expected %q, version not found", idx)
}

if !regexp.MustCompile(`^([0-9]+\.)+[0-9]+$`).MatchString(v) {
return fmt.Errorf("unexpected version format for %q, value is %v", idx, v)
}
}
return nil
}
Expand Down

0 comments on commit 7c28bf7

Please sign in to comment.