@@ -411,6 +411,23 @@ member_check = false
411
411
})
412
412
}
413
413
414
+ func TestAccGitlabProject_groupWithoutDefaultBranchProtection (t * testing.T ) {
415
+ var project gitlab.Project
416
+ rInt := acctest .RandInt ()
417
+
418
+ resource .Test (t , resource.TestCase {
419
+ PreCheck : func () { testAccPreCheck (t ) },
420
+ ProviderFactories : providerFactories ,
421
+ CheckDestroy : testAccCheckGitlabProjectDestroy ,
422
+ Steps : []resource.TestStep {
423
+ {
424
+ Config : testAccGitlabProjectConfigWithoutDefaultBranchProtection (rInt ),
425
+ Check : testAccCheckGitlabProjectExists ("gitlab_project.foo" , & project ),
426
+ },
427
+ },
428
+ })
429
+ }
430
+
414
431
func TestAccGitlabProject_IssueMergeRequestTemplates (t * testing.T ) {
415
432
var project gitlab.Project
416
433
rInt := acctest .RandInt ()
@@ -1075,6 +1092,23 @@ resource "gitlab_project" "foo" {
1075
1092
` , rInt , rInt , rInt )
1076
1093
}
1077
1094
1095
+ func testAccGitlabProjectConfigWithoutDefaultBranchProtection (rInt int ) string {
1096
+ return fmt .Sprintf (`
1097
+ resource "gitlab_group" "foo" {
1098
+ name = "foogroup-%d"
1099
+ path = "foogroup-%d"
1100
+ default_branch_protection = 0
1101
+ visibility_level = "public"
1102
+ }
1103
+
1104
+ resource "gitlab_project" "foo" {
1105
+ name = "foo-%d"
1106
+ description = "Terraform acceptance tests"
1107
+ namespace_id = "${gitlab_group.foo.id}"
1108
+ }
1109
+ ` , rInt , rInt , rInt )
1110
+ }
1111
+
1078
1112
func testAccGitlabProjectTransferBetweenGroups (rInt int ) string {
1079
1113
return fmt .Sprintf (`
1080
1114
resource "gitlab_group" "foo" {
0 commit comments