github.com/rvichery/terraform@v0.11.10/builtin/providers/terraform/provider_test.go (about)

     1  package terraform
     2  
     3  import (
     4  	"testing"
     5  
     6  	backendInit "github.com/hashicorp/terraform/backend/init"
     7  	"github.com/hashicorp/terraform/helper/schema"
     8  	"github.com/hashicorp/terraform/terraform"
     9  )
    10  
    11  var testAccProviders map[string]terraform.ResourceProvider
    12  var testAccProvider *schema.Provider
    13  
    14  func init() {
    15  	// Initialize the backends
    16  	backendInit.Init(nil)
    17  
    18  	testAccProvider = Provider().(*schema.Provider)
    19  	testAccProviders = map[string]terraform.ResourceProvider{
    20  		"terraform": testAccProvider,
    21  	}
    22  }
    23  
    24  func TestProvider(t *testing.T) {
    25  	if err := Provider().(*schema.Provider).InternalValidate(); err != nil {
    26  		t.Fatalf("err: %s", err)
    27  	}
    28  }
    29  
    30  func TestProvider_impl(t *testing.T) {
    31  	var _ terraform.ResourceProvider = Provider()
    32  }
    33  
    34  func testAccPreCheck(t *testing.T) {
    35  }