29 lines
704 B
Go
29 lines
704 B
Go
package digitalocean
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
|
)
|
|
|
|
func TestAccDataSourceDigitalOceanAccount_Basic(t *testing.T) {
|
|
resource.ParallelTest(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
ProviderFactories: testAccProviderFactories,
|
|
Steps: []resource.TestStep{
|
|
{
|
|
Config: fmt.Sprintf(testAccCheckDataSourceDigitalOceanAccountConfig_basic),
|
|
Check: resource.ComposeTestCheckFunc(
|
|
resource.TestCheckResourceAttrSet(
|
|
"data.digitalocean_account.foobar", "uuid"),
|
|
),
|
|
},
|
|
},
|
|
})
|
|
}
|
|
|
|
const testAccCheckDataSourceDigitalOceanAccountConfig_basic = `
|
|
data "digitalocean_account" "foobar" {
|
|
}`
|