@@ -3,17 +3,24 @@ package test
3
3
import (
4
4
"testing"
5
5
6
- "github.com/chanzuckerberg/go-misc/tftest"
7
6
"github.com/gruntwork-io/terratest/modules/terraform"
8
7
"github.com/stretchr/testify/require"
9
8
)
10
9
11
10
func TestAll (t * testing.T ) {
12
11
r := require .New (t )
13
12
14
- terraformOptions := tftest .Options ("us-east-1" , map [string ]interface {}{
15
- "restrict" : "all" ,
16
- })
13
+ terraformOptions := & terraform.Options {
14
+ TerraformDir : "." ,
15
+
16
+ EnvVars : map [string ]string {
17
+ "AWS_DEFAULT_REGION" : "us-east-1" ,
18
+ },
19
+
20
+ Vars : map [string ]interface {}{
21
+ "restrict" : "all" ,
22
+ },
23
+ }
17
24
18
25
defer terraform .Destroy (t , terraformOptions )
19
26
terraform .InitAndApply (t , terraformOptions )
@@ -32,10 +39,17 @@ func TestAll(t *testing.T) {
32
39
func TestNone (t * testing.T ) {
33
40
r := require .New (t )
34
41
35
- terraformOptions := tftest .Options ("us-east-1" , map [string ]interface {}{
36
- "restrict" : "none" ,
37
- })
42
+ terraformOptions := & terraform.Options {
43
+ TerraformDir : "." ,
44
+
45
+ EnvVars : map [string ]string {
46
+ "AWS_DEFAULT_REGION" : "us-east-1" ,
47
+ },
38
48
49
+ Vars : map [string ]interface {}{
50
+ "restrict" : "none" ,
51
+ },
52
+ }
39
53
defer terraform .Destroy (t , terraformOptions )
40
54
terraform .InitAndApply (t , terraformOptions )
41
55
@@ -51,9 +65,17 @@ func TestNone(t *testing.T) {
51
65
func TestNew (t * testing.T ) {
52
66
r := require .New (t )
53
67
54
- terraformOptions := tftest .Options ("us-east-1" , map [string ]interface {}{
55
- "restrict" : "new" ,
56
- })
68
+ terraformOptions := & terraform.Options {
69
+ TerraformDir : "." ,
70
+
71
+ EnvVars : map [string ]string {
72
+ "AWS_DEFAULT_REGION" : "us-east-1" ,
73
+ },
74
+
75
+ Vars : map [string ]interface {}{
76
+ "restrict" : "new" ,
77
+ },
78
+ }
57
79
58
80
defer terraform .Destroy (t , terraformOptions )
59
81
terraform .InitAndApply (t , terraformOptions )
0 commit comments