mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 01:26:43 +00:00
![ishashchuk](/assets/img/avatar_default.png)
* Data source for retrieving GCE service account * Added project id for service account lookups (#15) * Renaming attribute project_id -> project
32 lines
784 B
Go
32 lines
784 B
Go
package google
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccDataSourceGoogleComputeDefaultServiceAccount_basic(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
resourceName := "data.google_compute_default_service_account.default"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
Steps: []resource.TestStep{
|
|
{
|
|
Config: testAccCheckGoogleComputeDefaultServiceAccount_basic,
|
|
Check: resource.ComposeTestCheckFunc(
|
|
resource.TestCheckResourceAttrSet(resourceName, "id"),
|
|
resource.TestCheckResourceAttrSet(resourceName, "email"),
|
|
),
|
|
},
|
|
},
|
|
})
|
|
}
|
|
|
|
const testAccCheckGoogleComputeDefaultServiceAccount_basic = `
|
|
data "google_compute_default_service_account" "default" { }
|
|
`
|