github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/builtin/providers/influxdb/resource_database_test.go (about)

     1  package influxdb
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/resource"
     7  )
     8  
     9  func TestAccDatabase(t *testing.T) {
    10  	resource.Test(t, resource.TestCase{
    11  		Providers: testAccProviders,
    12  		Steps: []resource.TestStep{
    13  			resource.TestStep{
    14  				Config: testAccDatabaseConfig,
    15  				Check: resource.ComposeTestCheckFunc(
    16  					resource.TestCheckResourceAttr(
    17  						"influxdb_database.test", "name", "terraform-test",
    18  					),
    19  				),
    20  			},
    21  		},
    22  	})
    23  }
    24  
    25  var testAccDatabaseConfig = `
    26  
    27  resource "influxdb_database" "test" {
    28      name = "terraform-test"
    29  }
    30  
    31  `