github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/aws/data_source_aws_billing_service_account_test.go (about)

     1  package aws
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/resource"
     7  )
     8  
     9  func TestAccAWSBillingServiceAccount_basic(t *testing.T) {
    10  	resource.Test(t, resource.TestCase{
    11  		PreCheck:  func() { testAccPreCheck(t) },
    12  		Providers: testAccProviders,
    13  		Steps: []resource.TestStep{
    14  			resource.TestStep{
    15  				Config: testAccCheckAwsBillingServiceAccountConfig,
    16  				Check: resource.ComposeTestCheckFunc(
    17  					resource.TestCheckResourceAttr("data.aws_billing_service_account.main", "id", "386209384616"),
    18  					resource.TestCheckResourceAttr("data.aws_billing_service_account.main", "arn", "arn:aws:iam::386209384616:root"),
    19  				),
    20  			},
    21  		},
    22  	})
    23  }
    24  
    25  const testAccCheckAwsBillingServiceAccountConfig = `
    26  data "aws_billing_service_account" "main" { }
    27  `