(t *testing.T)
| 104 | } |
| 105 | |
| 106 | func EnsureTF(t *testing.T) string { |
| 107 | i := install.NewInstaller() |
| 108 | execPath, err := i.Ensure(context.Background(), []src.Source{ |
| 109 | &fs.Version{ |
| 110 | Product: product.Terraform, |
| 111 | Constraints: version.MustConstraints(version.NewConstraint(">=0.12")), |
| 112 | }, |
| 113 | }) |
| 114 | if err != nil { |
| 115 | t.Fatalf("failed to find a Terraform executable: %v", err) |
| 116 | } |
| 117 | return execPath |
| 118 | } |
| 119 | |
| 120 | func Verify(t *testing.T, ctx context.Context, aztfexportDir, tfexecPath string, expectResCnt int) { |
| 121 | tf, err := tfexec.NewTerraform(aztfexportDir, tfexecPath) |
no outgoing calls