@@ -14,12 +14,6 @@ import (
1414func TestAccGithubEnterpriseCostCenter (t * testing.T ) {
1515 randomID := acctest .RandStringFromCharSet (5 , acctest .CharSetAlphaNum )
1616
17- if isEnterprise != "true" {
18- t .Skip ("Skipping because `ENTERPRISE_ACCOUNT` is not set or set to false" )
19- }
20- if testEnterprise == "" {
21- t .Skip ("Skipping because `ENTERPRISE_SLUG` is not set" )
22- }
2317 testEnterpriseCostCenterOrganization := os .Getenv ("ENTERPRISE_TEST_ORGANIZATION" )
2418 testEnterpriseCostCenterRepository := os .Getenv ("ENTERPRISE_TEST_REPOSITORY" )
2519 testEnterpriseCostCenterUsers := os .Getenv ("ENTERPRISE_TEST_USERS" )
@@ -55,7 +49,7 @@ func TestAccGithubEnterpriseCostCenter(t *testing.T) {
5549 organizations = [%q]
5650 repositories = [%q]
5751 }
58- ` , testEnterprise , randomID , usersBefore , testEnterpriseCostCenterOrganization , testEnterpriseCostCenterRepository )
52+ ` , testAccConf . enterpriseSlug , randomID , usersBefore , testEnterpriseCostCenterOrganization , testEnterpriseCostCenterRepository )
5953
6054 configAfter := fmt .Sprintf (`
6155 data "github_enterprise" "enterprise" {
@@ -70,7 +64,7 @@ func TestAccGithubEnterpriseCostCenter(t *testing.T) {
7064 organizations = []
7165 repositories = []
7266 }
73- ` , testEnterprise , randomID , usersAfter )
67+ ` , testAccConf . enterpriseSlug , randomID , usersAfter )
7468
7569 configEmpty := fmt .Sprintf (`
7670 data "github_enterprise" "enterprise" {
@@ -85,10 +79,10 @@ func TestAccGithubEnterpriseCostCenter(t *testing.T) {
8579 organizations = []
8680 repositories = []
8781 }
88- ` , testEnterprise , randomID )
82+ ` , testAccConf . enterpriseSlug , randomID )
8983
9084 checkBefore := resource .ComposeTestCheckFunc (
91- resource .TestCheckResourceAttr ("github_enterprise_cost_center.test" , "enterprise_slug" , testEnterprise ),
85+ resource .TestCheckResourceAttr ("github_enterprise_cost_center.test" , "enterprise_slug" , testAccConf . enterpriseSlug ),
9286 resource .TestCheckResourceAttr ("github_enterprise_cost_center.test" , "name" , fmt .Sprintf ("tf-acc-test-%s" , randomID )),
9387 resource .TestCheckResourceAttr ("github_enterprise_cost_center.test" , "state" , "active" ),
9488 resource .TestCheckResourceAttr ("github_enterprise_cost_center.test" , "organizations.#" , "1" ),
@@ -140,7 +134,7 @@ func TestAccGithubEnterpriseCostCenter(t *testing.T) {
140134 if ! ok {
141135 return "" , fmt .Errorf ("resource not found in state" )
142136 }
143- return fmt .Sprintf ("%s/%s" , testEnterprise , rs .Primary .ID ), nil
137+ return fmt .Sprintf ("%s/%s" , testAccConf . enterpriseSlug , rs .Primary .ID ), nil
144138 },
145139 },
146140 },
0 commit comments