opentofu/builtin/providers/influxdb/resource_database_test.go
Martin Atkins 1c07e0de21 influxdb_database resource.
Creates a database on an InfluxDB server. InfluxDB databases don't have
any schema or other settings, so this is a really simple resource.
2016-03-20 14:53:34 -05:00

32 lines
556 B
Go

package influxdb
import (
"testing"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccDatabase(t *testing.T) {
resource.Test(t, resource.TestCase{
Providers: testAccProviders,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccDatabaseConfig,
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(
"influxdb_database.test", "name", "terraform-test",
),
),
},
},
})
}
var testAccDatabaseConfig = `
resource "influxdb_database" "test" {
name = "terraform-test"
}
`