Skip to content

Commit

Permalink
Remove version formate validation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisst authored and modular-magician committed Jun 4, 2019
1 parent 1ed2b8d commit 74de467
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 74de467

Please sign in to comment.