@@ -11,10 +11,11 @@ import (
1111func TestAccGithubActionsVariablesDataSource (t * testing.T ) {
1212 t .Run ("queries actions variables from a repository" , func (t * testing.T ) {
1313 randomID := acctest .RandStringFromCharSet (5 , acctest .CharSetAlphaNum )
14+ repoName := fmt .Sprintf ("%srepo-actions-vars-%s" , testResourcePrefix , randomID )
1415
1516 config := fmt .Sprintf (`
1617 resource "github_repository" "test" {
17- name = "tf-acc-test- %s"
18+ name = "%s"
1819 auto_init = true
1920 }
2021
@@ -23,7 +24,7 @@ func TestAccGithubActionsVariablesDataSource(t *testing.T) {
2324 repository = github_repository.test.name
2425 value = "foo"
2526 }
26- ` , randomID )
27+ ` , repoName )
2728
2829 config2 := config + `
2930 data "github_actions_variables" "test" {
@@ -32,7 +33,7 @@ func TestAccGithubActionsVariablesDataSource(t *testing.T) {
3233 `
3334
3435 check := resource .ComposeTestCheckFunc (
35- resource .TestCheckResourceAttr ("data.github_actions_variables.test" , "name" , fmt . Sprintf ( "tf-acc-test-%s" , randomID ) ),
36+ resource .TestCheckResourceAttr ("data.github_actions_variables.test" , "name" , repoName ),
3637 resource .TestCheckResourceAttr ("data.github_actions_variables.test" , "variables.#" , "1" ),
3738 resource .TestCheckResourceAttr ("data.github_actions_variables.test" , "variables.0.name" , "VARIABLE_1" ),
3839 resource .TestCheckResourceAttr ("data.github_actions_variables.test" , "variables.0.value" , "foo" ),
0 commit comments