4
4
package provider
5
5
6
6
import (
7
+ "context"
7
8
"fmt"
8
9
"math/rand"
9
10
"regexp"
@@ -17,6 +18,8 @@ import (
17
18
"github.com/hashicorp/terraform-plugin-testing/terraform"
18
19
)
19
20
21
+ var ctx = context .Background ()
22
+
20
23
func TestAccTFERegistryModule_vcsBasic (t * testing.T ) {
21
24
registryModule := & tfe.RegistryModule {}
22
25
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
@@ -666,7 +669,7 @@ func TestAccTFERegistryModuleImport_vcsPublishingMechanismTagsToBranchToTags(t *
666
669
Config : testAccTFERegistryModule_vcsTags (rInt ),
667
670
Check : resource .ComposeTestCheckFunc (
668
671
resource .TestCheckResourceAttr ("tfe_registry_module.foobar" , "publishing_mechanism" , "git_tag" ),
669
- resource .TestCheckNoResourceAttr ("tfe_registry_module.foobar" , "test_config.0.tests_enabled " ),
672
+ resource .TestCheckNoResourceAttr ("tfe_registry_module.foobar" , "test_config.0" ),
670
673
resource .TestCheckResourceAttr ("tfe_registry_module.foobar" , "vcs_repo.0.tags" , strconv .FormatBool (true )),
671
674
resource .TestCheckResourceAttr ("tfe_registry_module.foobar" , "vcs_repo.0.branch" , "" ),
672
675
),
@@ -686,7 +689,7 @@ func TestAccTFERegistryModule_invalidTestConfigOnCreate(t *testing.T) {
686
689
ProtoV6ProviderFactories : testAccMuxedProviders ,
687
690
Steps : []resource.TestStep {
688
691
{
689
- Config : testAccTFERegistryModule_vcsInvalidBranch (rInt ),
692
+ Config : testAccTFERegistryModule_invalidTestConfig (rInt ),
690
693
ExpectError : regexp .MustCompile (`tests_enabled must be provided when configuring a test_config` ),
691
694
},
692
695
},
0 commit comments