Skip to content

Commit 41e7acd

Browse files
authored
chore: Refactor test provider (#3146)
Signed-off-by: Steve Hipwell <[email protected]>
1 parent d09bfd4 commit 41e7acd

86 files changed

Lines changed: 242 additions & 20493 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

github/data_source_github_actions_environment_public_key_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func TestAccGithubActionsEnvironmentPublicKeyDataSource(t *testing.T) {
3636
)
3737

3838
resource.Test(t, resource.TestCase{
39-
PreCheck: func() { skipUnauthenticated(t) },
40-
Providers: testAccProviders,
39+
PreCheck: func() { skipUnauthenticated(t) },
40+
ProviderFactories: providerFactories,
4141
Steps: []resource.TestStep{
4242
{
4343
Config: config,

github/data_source_github_organization_repository_role_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func TestAccGithubOrganizationRepositoryRoleDataSource(t *testing.T) {
3232
`, roleName)
3333

3434
resource.Test(t, resource.TestCase{
35-
PreCheck: func() { skipUnlessMode(t, enterprise) },
36-
Providers: testAccProviders,
35+
PreCheck: func() { skipUnlessMode(t, enterprise) },
36+
ProviderFactories: providerFactories,
3737
Steps: []resource.TestStep{
3838
{
3939
Config: config,

github/data_source_github_organization_repository_roles_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ func TestAccDataSourceGithubOrganizationRepositoryRoles(t *testing.T) {
1313
`
1414

1515
resource.Test(t, resource.TestCase{
16-
PreCheck: func() { skipUnlessHasPaidOrgs(t) },
17-
Providers: testAccProviders,
16+
PreCheck: func() { skipUnlessHasPaidOrgs(t) },
17+
ProviderFactories: providerFactories,
1818
Steps: []resource.TestStep{
1919
{
2020
Config: config,
@@ -45,8 +45,8 @@ func TestAccDataSourceGithubOrganizationRepositoryRoles(t *testing.T) {
4545
`
4646

4747
resource.Test(t, resource.TestCase{
48-
PreCheck: func() { skipUnlessMode(t, enterprise) },
49-
Providers: testAccProviders,
48+
PreCheck: func() { skipUnlessMode(t, enterprise) },
49+
ProviderFactories: providerFactories,
5050
Steps: []resource.TestStep{
5151
{
5252
Config: config,

github/data_source_github_organization_role_teams_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ func TestAccDataSourceGithubOrganizationRoleTeams(t *testing.T) {
3333
`, teamName, roleId)
3434

3535
resource.Test(t, resource.TestCase{
36-
PreCheck: func() { skipUnlessHasOrgs(t) },
37-
Providers: testAccProviders,
36+
PreCheck: func() { skipUnlessHasOrgs(t) },
37+
ProviderFactories: providerFactories,
3838
Steps: []resource.TestStep{
3939
{
4040
Config: config,
@@ -82,8 +82,8 @@ func TestAccDataSourceGithubOrganizationRoleTeams(t *testing.T) {
8282
`, teamName1, teamName2, roleId)
8383

8484
resource.Test(t, resource.TestCase{
85-
PreCheck: func() { skipUnlessHasOrgs(t) },
86-
Providers: testAccProviders,
85+
PreCheck: func() { skipUnlessHasOrgs(t) },
86+
ProviderFactories: providerFactories,
8787
Steps: []resource.TestStep{
8888
{
8989
Config: config,

github/data_source_github_organization_role_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func TestAccDataSourceGithubOrganizationRole(t *testing.T) {
1818
`, roleId)
1919

2020
resource.Test(t, resource.TestCase{
21-
PreCheck: func() { skipUnlessHasOrgs(t) },
22-
Providers: testAccProviders,
21+
PreCheck: func() { skipUnlessHasOrgs(t) },
22+
ProviderFactories: providerFactories,
2323
Steps: []resource.TestStep{
2424
{
2525
Config: config,

github/data_source_github_organization_role_users_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ func TestAccDataSourceGithubOrganizationRoleUsers(t *testing.T) {
3131
`, roleId, testAccConf.testOrgUser)
3232

3333
resource.Test(t, resource.TestCase{
34-
PreCheck: func() { skipUnlessHasOrgs(t) },
35-
Providers: testAccProviders,
34+
PreCheck: func() { skipUnlessHasOrgs(t) },
35+
ProviderFactories: providerFactories,
3636
Steps: []resource.TestStep{
3737
{
3838
Config: config,
@@ -81,8 +81,8 @@ func TestAccDataSourceGithubOrganizationRoleUsers(t *testing.T) {
8181
`, teamName, testAccConf.testOrgUser, roleId)
8282

8383
resource.Test(t, resource.TestCase{
84-
PreCheck: func() { skipUnlessHasOrgs(t) },
85-
Providers: testAccProviders,
84+
PreCheck: func() { skipUnlessHasOrgs(t) },
85+
ProviderFactories: providerFactories,
8686
Steps: []resource.TestStep{
8787
{
8888
Config: config,

github/data_source_github_organization_roles_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ func TestAccDataSourceGithubOrganizationRoles(t *testing.T) {
1313
`
1414

1515
resource.Test(t, resource.TestCase{
16-
PreCheck: func() { skipUnlessHasOrgs(t) },
17-
Providers: testAccProviders,
16+
PreCheck: func() { skipUnlessHasOrgs(t) },
17+
ProviderFactories: providerFactories,
1818
Steps: []resource.TestStep{
1919
{
2020
Config: config,

github/data_source_github_organization_security_managers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func TestAccDataSourceGithubOrganizationSecurityManagers(t *testing.T) {
3030
`, teamName)
3131

3232
resource.Test(t, resource.TestCase{
33-
PreCheck: func() { skipUnlessHasOrgs(t) },
34-
Providers: testAccProviders,
33+
PreCheck: func() { skipUnlessHasOrgs(t) },
34+
ProviderFactories: providerFactories,
3535
Steps: []resource.TestStep{
3636
{
3737
Config: config,

github/data_source_github_repository_custom_properties_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ func TestAccGithubRepositoryCustomPropertiesDataSource(t *testing.T) {
4545
)
4646

4747
resource.Test(t, resource.TestCase{
48-
PreCheck: func() { skipUnlessHasOrgs(t) },
49-
Providers: testAccProviders,
48+
PreCheck: func() { skipUnlessHasOrgs(t) },
49+
ProviderFactories: providerFactories,
5050
Steps: []resource.TestStep{
5151
{
5252
Config: config,
@@ -93,8 +93,8 @@ func TestAccGithubRepositoryCustomPropertiesDataSource(t *testing.T) {
9393
)
9494

9595
resource.Test(t, resource.TestCase{
96-
PreCheck: func() { skipUnlessHasOrgs(t) },
97-
Providers: testAccProviders,
96+
PreCheck: func() { skipUnlessHasOrgs(t) },
97+
ProviderFactories: providerFactories,
9898
Steps: []resource.TestStep{
9999
{
100100
Config: config,
@@ -139,8 +139,8 @@ func TestAccGithubRepositoryCustomPropertiesDataSource(t *testing.T) {
139139
)
140140

141141
resource.Test(t, resource.TestCase{
142-
PreCheck: func() { skipUnlessHasOrgs(t) },
143-
Providers: testAccProviders,
142+
PreCheck: func() { skipUnlessHasOrgs(t) },
143+
ProviderFactories: providerFactories,
144144
Steps: []resource.TestStep{
145145
{
146146
Config: config,
@@ -185,8 +185,8 @@ func TestAccGithubRepositoryCustomPropertiesDataSource(t *testing.T) {
185185
)
186186

187187
resource.Test(t, resource.TestCase{
188-
PreCheck: func() { skipUnlessHasOrgs(t) },
189-
Providers: testAccProviders,
188+
PreCheck: func() { skipUnlessHasOrgs(t) },
189+
ProviderFactories: providerFactories,
190190
Steps: []resource.TestStep{
191191
{
192192
Config: config,

github/data_source_github_repository_environment_deployment_policies_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ func TestAccGithubRepositoryEnvironmentDeploymentPolicies(t *testing.T) {
4949
`, repoName)
5050

5151
resource.Test(t, resource.TestCase{
52-
PreCheck: func() { skipUnauthenticated(t) },
53-
Providers: testAccProviders,
52+
PreCheck: func() { skipUnauthenticated(t) },
53+
ProviderFactories: providerFactories,
5454
Steps: []resource.TestStep{
5555
{
5656
Config: config,

0 commit comments

Comments
 (0)