@@ -26,8 +26,8 @@ func TestAccGitlabBranchProtection_basic(t *testing.T) {
26
26
{
27
27
Config : testAccGitlabBranchProtectionConfig (rInt ),
28
28
Check : resource .ComposeTestCheckFunc (
29
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
30
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
29
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
30
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
31
31
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
32
32
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
33
33
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -39,8 +39,8 @@ func TestAccGitlabBranchProtection_basic(t *testing.T) {
39
39
{
40
40
Config : testAccGitlabBranchProtectionUpdateConfig (rInt ),
41
41
Check : resource .ComposeTestCheckFunc (
42
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
43
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
42
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
43
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
44
44
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
45
45
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
46
46
PushAccessLevel : accessLevel [gitlab .MasterPermissions ],
@@ -52,8 +52,8 @@ func TestAccGitlabBranchProtection_basic(t *testing.T) {
52
52
{
53
53
Config : testAccGitlabBranchProtectionConfig (rInt ),
54
54
Check : resource .ComposeTestCheckFunc (
55
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
56
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
55
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
56
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
57
57
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
58
58
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
59
59
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -66,8 +66,8 @@ func TestAccGitlabBranchProtection_basic(t *testing.T) {
66
66
SkipFunc : isRunningInCE ,
67
67
Config : testAccGitlabBranchProtectionUpdateConfigCodeOwnerTrue (rInt ),
68
68
Check : resource .ComposeTestCheckFunc (
69
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
70
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
69
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
70
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
71
71
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
72
72
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
73
73
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -82,8 +82,8 @@ func TestAccGitlabBranchProtection_basic(t *testing.T) {
82
82
Config : testAccGitlabBranchProtectionUpdateConfigCodeOwnerTrue (rInt ),
83
83
ExpectError : regexp .MustCompile ("feature unavailable: code owner approvals" ),
84
84
Check : resource .ComposeTestCheckFunc (
85
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
86
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
85
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
86
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
87
87
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
88
88
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
89
89
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -95,8 +95,8 @@ func TestAccGitlabBranchProtection_basic(t *testing.T) {
95
95
{
96
96
Config : testAccGitlabBranchProtectionConfig (rInt ),
97
97
Check : resource .ComposeTestCheckFunc (
98
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
99
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
98
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
99
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
100
100
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
101
101
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
102
102
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -122,8 +122,8 @@ func TestAccGitlabBranchProtection_createWithCodeOwnerApproval(t *testing.T) {
122
122
SkipFunc : isRunningInCE ,
123
123
Config : testAccGitlabBranchProtectionUpdateConfigCodeOwnerTrue (rInt ),
124
124
Check : resource .ComposeTestCheckFunc (
125
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
126
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
125
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
126
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
127
127
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
128
128
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
129
129
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -138,8 +138,8 @@ func TestAccGitlabBranchProtection_createWithCodeOwnerApproval(t *testing.T) {
138
138
Config : testAccGitlabBranchProtectionUpdateConfigCodeOwnerTrue (rInt ),
139
139
ExpectError : regexp .MustCompile ("feature unavailable: code owner approvals" ),
140
140
Check : resource .ComposeTestCheckFunc (
141
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
142
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
141
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
142
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
143
143
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
144
144
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
145
145
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -151,8 +151,8 @@ func TestAccGitlabBranchProtection_createWithCodeOwnerApproval(t *testing.T) {
151
151
{
152
152
Config : testAccGitlabBranchProtectionConfig (rInt ),
153
153
Check : resource .ComposeTestCheckFunc (
154
- testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.BranchProtect " , & pb ),
155
- testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.BranchProtect " , & pb ),
154
+ testAccCheckGitlabBranchProtectionExists ("gitlab_branch_protection.branch_protect " , & pb ),
155
+ testAccCheckGitlabBranchProtectionPersistsInStateCorrectly ("gitlab_branch_protection.branch_protect " , & pb ),
156
156
testAccCheckGitlabBranchProtectionAttributes (& pb , & testAccGitlabBranchProtectionExpectedAttributes {
157
157
Name : fmt .Sprintf ("BranchProtect-%d" , rInt ),
158
158
PushAccessLevel : accessLevel [gitlab .DeveloperPermissions ],
@@ -278,8 +278,8 @@ resource "gitlab_project" "foo" {
278
278
visibility_level = "public"
279
279
}
280
280
281
- resource "gitlab_branch_protection" "BranchProtect " {
282
- project = "${ gitlab_project.foo.id}"
281
+ resource "gitlab_branch_protection" "branch_protect " {
282
+ project = gitlab_project.foo.id
283
283
branch = "BranchProtect-%d"
284
284
push_access_level = "developer"
285
285
merge_access_level = "developer"
@@ -298,8 +298,8 @@ resource "gitlab_project" "foo" {
298
298
visibility_level = "public"
299
299
}
300
300
301
- resource "gitlab_branch_protection" "BranchProtect " {
302
- project = "${ gitlab_project.foo.id}"
301
+ resource "gitlab_branch_protection" "branch_protect " {
302
+ project = gitlab_project.foo.id
303
303
branch = "BranchProtect-%d"
304
304
push_access_level = "maintainer"
305
305
merge_access_level = "maintainer"
@@ -318,7 +318,7 @@ resource "gitlab_project" "foo" {
318
318
visibility_level = "public"
319
319
}
320
320
321
- resource "gitlab_branch_protection" "BranchProtect " {
321
+ resource "gitlab_branch_protection" "branch_protect " {
322
322
project = gitlab_project.foo.id
323
323
branch = "BranchProtect-%d"
324
324
push_access_level = "developer"
0 commit comments