@@ -31,7 +31,7 @@ func TestAccTFEProjectPolicySet_basic(t *testing.T) {
31
31
t .Cleanup (orgCleanup )
32
32
33
33
// Make a project
34
- prj := createProject (t , tfeClient , org .Name , tfe.ProjectCreateOptions {
34
+ project := createProject (t , tfeClient , org .Name , tfe.ProjectCreateOptions {
35
35
Name : randomString (t ),
36
36
})
37
37
@@ -41,7 +41,7 @@ func TestAccTFEProjectPolicySet_basic(t *testing.T) {
41
41
CheckDestroy : testAccCheckTFEProjectPolicySetDestroy ,
42
42
Steps : []resource.TestStep {
43
43
{
44
- Config : testAccTFEProjectPolicySet_basic (org .Name , prj .ID ),
44
+ Config : testAccTFEProjectPolicySet_basic (org .Name , project .ID ),
45
45
Check : resource .ComposeTestCheckFunc (
46
46
testAccCheckTFEProjectPolicySetExists (
47
47
"tfe_project_policy_set.test" ),
@@ -50,7 +50,7 @@ func TestAccTFEProjectPolicySet_basic(t *testing.T) {
50
50
{
51
51
ResourceName : "tfe_project_policy_set.test" ,
52
52
ImportState : true ,
53
- ImportStateId : fmt .Sprintf ("%s/%s/policy_set_test" , org .Name , prj .ID ),
53
+ ImportStateId : fmt .Sprintf ("%s/%s/policy_set_test" , org .Name , project .ID ),
54
54
ImportStateVerify : true ,
55
55
},
56
56
},
@@ -73,7 +73,7 @@ func TestAccTFEProjectPolicySet_incorrectImportSyntax(t *testing.T) {
73
73
t .Cleanup (orgCleanup )
74
74
75
75
// Make a project
76
- prj := createProject (t , tfeClient , org .Name , tfe.ProjectCreateOptions {
76
+ project := createProject (t , tfeClient , org .Name , tfe.ProjectCreateOptions {
77
77
Name : randomString (t ),
78
78
})
79
79
@@ -82,7 +82,7 @@ func TestAccTFEProjectPolicySet_incorrectImportSyntax(t *testing.T) {
82
82
Providers : testAccProviders ,
83
83
Steps : []resource.TestStep {
84
84
{
85
- Config : testAccTFEProjectPolicySet_basic (org .Name , prj .ID ),
85
+ Config : testAccTFEProjectPolicySet_basic (org .Name , project .ID ),
86
86
},
87
87
{
88
88
ResourceName : "tfe_project_policy_set.test" ,
@@ -100,22 +100,22 @@ func testAccCheckTFEProjectPolicySetExists(n string) resource.TestCheckFunc {
100
100
101
101
rs , ok := s .RootModule ().Resources [n ]
102
102
if ! ok {
103
- return fmt .Errorf ("Not found: %s" , n )
103
+ return fmt .Errorf ("not found: %s" , n )
104
104
}
105
105
106
106
id := rs .Primary .ID
107
107
if id == "" {
108
- return fmt .Errorf ("No ID is set" )
108
+ return fmt .Errorf ("no ID is set" )
109
109
}
110
110
111
111
policySetID := rs .Primary .Attributes ["policy_set_id" ]
112
112
if policySetID == "" {
113
- return fmt .Errorf ("No policy set id set" )
113
+ return fmt .Errorf ("no policy set id set" )
114
114
}
115
115
116
116
projectID := rs .Primary .Attributes ["project_id" ]
117
117
if projectID == "" {
118
- return fmt .Errorf ("No project id set" )
118
+ return fmt .Errorf ("no project id set" )
119
119
}
120
120
121
121
policySet , err := config .Client .PolicySets .ReadWithOptions (ctx , policySetID , & tfe.PolicySetReadOptions {
@@ -130,7 +130,7 @@ func testAccCheckTFEProjectPolicySetExists(n string) resource.TestCheckFunc {
130
130
}
131
131
}
132
132
133
- return fmt .Errorf ("Project (%s) is not attached to policy set (%s)." , projectID , policySetID )
133
+ return fmt .Errorf ("project (%s) is not attached to policy set (%s)." , projectID , policySetID )
134
134
}
135
135
}
136
136
@@ -143,12 +143,12 @@ func testAccCheckTFEProjectPolicySetDestroy(s *terraform.State) error {
143
143
}
144
144
145
145
if rs .Primary .ID == "" {
146
- return fmt .Errorf ("No instance ID is set" )
146
+ return fmt .Errorf ("no instance ID is set" )
147
147
}
148
148
149
149
_ , err := config .Client .PolicySets .Read (ctx , rs .Primary .ID )
150
150
if err == nil {
151
- return fmt .Errorf ("Policy Set %s still exists" , rs .Primary .ID )
151
+ return fmt .Errorf ("policy Set %s still exists" , rs .Primary .ID )
152
152
}
153
153
}
154
154
0 commit comments