@@ -260,13 +260,15 @@ func TestAccGitlabGroup_PreventForkingOutsideGroup(t *testing.T) {
260
260
Config : testAccGitlabGroupPreventForkingOutsideGroupConfig (rInt ),
261
261
Check : resource .ComposeTestCheckFunc (
262
262
testAccCheckGitlabGroupExists ("gitlab_group.foo" , & group ),
263
- func (s * terraform.State ) error {
264
- if group .PreventForkingOutsideGroup != true {
265
- return fmt .Errorf ("expected forking outside the group to be disabled" )
266
- }
267
-
268
- return nil
269
- },
263
+ resource .TestCheckResourceAttr ("gitlab_group.foo" , "prevent_forking_outside_group" , "true" ),
264
+ ),
265
+ },
266
+ {
267
+ SkipFunc : isRunningInCE ,
268
+ Config : testAccGitlabGroupPreventForkingOutsideGroupUpdateConfig (rInt ),
269
+ Check : resource .ComposeTestCheckFunc (
270
+ testAccCheckGitlabGroupExists ("gitlab_group.foo" , & group ),
271
+ resource .TestCheckResourceAttr ("gitlab_group.foo" , "prevent_forking_outside_group" , "false" ),
270
272
),
271
273
},
272
274
},
@@ -587,3 +589,19 @@ resource "gitlab_group" "foo" {
587
589
}
588
590
` , rInt , rInt )
589
591
}
592
+
593
+ func testAccGitlabGroupPreventForkingOutsideGroupUpdateConfig (rInt int ) string {
594
+ return fmt .Sprintf (`
595
+ resource "gitlab_group" "foo" {
596
+ name = "foo-name-%d"
597
+ path = "foo-path-%d"
598
+ description = "Terraform acceptance tests"
599
+
600
+ # So that acceptance tests can be run in a gitlab organization
601
+ # with no billing
602
+ visibility_level = "public"
603
+
604
+ prevent_forking_outside_group = false
605
+ }
606
+ ` , rInt , rInt )
607
+ }
0 commit comments