Skip to content

Commit 4036753

Browse files
committed
Change provider code to best practices from terraform-provider-scaffolding project
1 parent 4d36996 commit 4036753

File tree

105 files changed

+518
-617
lines changed

Some content is hidden

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

105 files changed

+518
-617
lines changed

internal/provider/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"crypto/tls"

internal/provider/custom_attribute_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"fmt"

internal/provider/data_source_gitlab_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"context"

internal/provider/data_source_gitlab_group_membership.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"context"

internal/provider/data_source_gitlab_group_membership_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"fmt"
@@ -12,8 +12,8 @@ func TestAccDataSourceGitlabMembership_basic(t *testing.T) {
1212
rInt := acctest.RandInt()
1313

1414
resource.Test(t, resource.TestCase{
15-
PreCheck: func() { testAccPreCheck(t) },
16-
Providers: testAccProviders,
15+
PreCheck: func() { testAccPreCheck(t) },
16+
ProviderFactories: providerFactories,
1717
Steps: []resource.TestStep{
1818
// Create the group and one member
1919
{

internal/provider/data_source_gitlab_group_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"fmt"
@@ -13,8 +13,8 @@ func TestAccDataSourceGitlabGroup_basic(t *testing.T) {
1313
rString := fmt.Sprintf("%s", acctest.RandString(5)) // nolint // TODO: Resolve this golangci-lint issue: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
1414

1515
resource.Test(t, resource.TestCase{
16-
PreCheck: func() { testAccPreCheck(t) },
17-
Providers: testAccProviders,
16+
PreCheck: func() { testAccPreCheck(t) },
17+
ProviderFactories: providerFactories,
1818
Steps: []resource.TestStep{
1919
// Get group using its ID
2020
{

internal/provider/data_source_gitlab_project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"context"

internal/provider/data_source_gitlab_project_protected_branch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"context"

internal/provider/data_source_gitlab_project_protected_branch_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"fmt"
@@ -12,8 +12,8 @@ func TestAccDataGitlabProjectProtectedBranch_search(t *testing.T) {
1212
projectName := fmt.Sprintf("tf-%s", acctest.RandString(5))
1313

1414
resource.Test(t, resource.TestCase{
15-
PreCheck: func() { testAccPreCheck(t) },
16-
Providers: testAccProviders,
15+
PreCheck: func() { testAccPreCheck(t) },
16+
ProviderFactories: providerFactories,
1717
Steps: []resource.TestStep{
1818
{
1919
Config: testAccDataGitlabProjectProtectedBranchConfigGetProjectSearch(projectName),

internal/provider/data_source_gitlab_project_protected_branches.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gitlab
1+
package provider
22

33
import (
44
"context"

0 commit comments

Comments
 (0)