INNER CODE UNIT · Go

TestMain

hashicorp/terraform-plugin-docs · cmd/tfplugindocs/main_test.go:15

func TestMain(m *testing.M) {
	testscript.Main(m, map[string]func(){
		"tfplugindocs": cmd.TestScriptMain,
	})
}

func Test_ProviderBuild_GenerateAcceptanceTests(t *testing.T) {
	t.Parallel()
	if os.Getenv("ACCTEST") == "" {
		t.Skip("ACCTEST env var not set; skipping provider build acceptance tests.")
	}
	// Setting a custom temp dir instead of relying on os.TempDir()
	// because Terraform providers fail to start up when $TMPDIR
	// length is too long: https://github.com/hashicorp/terraform/issues/32787
	tmpDir := "/tmp/tftmp"
	err := os.MkdirAll(tmpDir, 0755)
	if err != nil {
		t.Errorf("Error creating temp dir for testing: %s", err.Error())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…