@@ -237,8 +237,9 @@ func TestGithubOrganizationRulesets(t *testing.T) {
237237 })
238238
239239 t .Run ("Imports rulesets without error" , func (t * testing.T ) {
240+ resourceName := "test-import-rulesets"
240241 config := fmt .Sprintf (`
241- resource "github_organization_ruleset" "test " {
242+ resource "github_organization_ruleset" "%s " {
242243 name = "test-%s"
243244 target = "branch"
244245 enforcement = "active"
@@ -265,6 +266,7 @@ func TestGithubOrganizationRulesets(t *testing.T) {
265266 required_signatures = false
266267
267268 pull_request {
269+ allowed_merge_methods = ["merge", "squash", "rebase"]
268270 required_approving_review_count = 2
269271 required_review_thread_resolution = true
270272 require_code_owner_review = true
@@ -292,10 +294,10 @@ func TestGithubOrganizationRulesets(t *testing.T) {
292294 non_fast_forward = true
293295 }
294296 }
295- ` , randomID )
297+ ` , resourceName , randomID )
296298
297299 check := resource .ComposeTestCheckFunc (
298- resource .TestCheckResourceAttrSet ("github_organization_ruleset.test" , "name" ),
300+ resource .TestCheckResourceAttrSet (fmt . Sprintf ( "github_organization_ruleset.%s" , resourceName ) , "name" ),
299301 )
300302
301303 testCase := func (t * testing.T , mode string ) {
@@ -308,7 +310,7 @@ func TestGithubOrganizationRulesets(t *testing.T) {
308310 Check : check ,
309311 },
310312 {
311- ResourceName : "github_organization_ruleset.test" ,
313+ ResourceName : fmt . Sprintf ( "github_organization_ruleset.%s" , resourceName ) ,
312314 ImportState : true ,
313315 ImportStateVerify : true ,
314316 },
0 commit comments