Skip to content

Commit 1afa672

Browse files
committed
Refactor test helper and remove unused context
Renamed testAccTFERegistryModule_vcsInvalidBranch to testAccTFERegistryModule_invalidTestConfig for clarity and updated its usage. Also removed the unused context variable from the test file.
1 parent b3c99ed commit 1afa672

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

internal/provider/resource_tfe_registry_module_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package provider
55

66
import (
7-
"context"
87
"fmt"
98
"math/rand"
109
"regexp"
@@ -18,8 +17,6 @@ import (
1817
"github.com/hashicorp/terraform-plugin-testing/terraform"
1918
)
2019

21-
var ctx = context.Background()
22-
2320
func TestAccTFERegistryModule_vcsBasic(t *testing.T) {
2421
registryModule := &tfe.RegistryModule{}
2522
rInt := rand.New(rand.NewSource(time.Now().UnixNano())).Int()
@@ -716,7 +713,7 @@ func TestAccTFERegistryModule_invalidTestConfigOnUpdate(t *testing.T) {
716713
),
717714
},
718715
{
719-
Config: testAccTFERegistryModule_vcsInvalidBranch(rInt),
716+
Config: testAccTFERegistryModule_invalidTestConfig(rInt),
720717
ExpectError: regexp.MustCompile(`tests_enabled must be provided when configuring a test_config`),
721718
},
722719
},
@@ -1216,7 +1213,7 @@ resource "tfe_registry_module" "foobar" {
12161213
envGithubRegistryModuleIdentifer,
12171214
envGithubRegistryModuleIdentifer)
12181215
}
1219-
func testAccTFERegistryModule_vcsInvalidBranch(rInt int) string {
1216+
func testAccTFERegistryModule_invalidTestConfig(rInt int) string {
12201217
return fmt.Sprintf(`
12211218
resource "tfe_organization" "foobar" {
12221219
name = "tst-terraform-%d"

0 commit comments

Comments
 (0)