github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/logentries/provider_test.go (about)

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