@@ -18,9 +18,6 @@ func TestAccEphemeralServiceAccountKey_create(t *testing.T) {
1818 resource .Test (t , resource.TestCase {
1919 PreCheck : func () { acctest .AccTestPreCheck (t ) },
2020 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
21- ExternalProviders : map [string ]resource.ExternalProvider {
22- "time" : {},
23- },
2421 Steps : []resource.TestStep {
2522 {
2623 Config : testAccEphemeralServiceAccountKey_create_setup (accountID , displayName ),
@@ -39,10 +36,6 @@ resource "google_service_account" "service_account" {
3936 display_name = "%s"
4037}
4138
42- resource "time_sleep" "wait_10_seconds" {
43- create_duration = "10s"
44- depends_on = [google_service_account.service_account]
45- }
4639` , accountID , displayName )
4740}
4841
@@ -53,11 +46,6 @@ resource "google_service_account" "service_account" {
5346 display_name = "%s"
5447}
5548
56- resource "time_sleep" "wait_10_seconds" {
57- create_duration = "10s"
58- depends_on = [google_service_account.service_account]
59- }
60-
6149ephemeral "google_service_account_key" "key" {
6250 service_account_id = google_service_account.service_account.email
6351 public_key_type = "TYPE_X509_PEM_FILE"
@@ -68,8 +56,8 @@ ephemeral "google_service_account_key" "key" {
6856func TestAccEphemeralServiceAccountKey_upload (t * testing.T ) {
6957 t .Parallel ()
7058
71- accountID := "a " + acctest .RandString (t , 10 )
72- displayName := "Terraform Test"
59+ accountID := "b " + acctest .RandString (t , 10 )
60+ displayName := "Terraform Test Two "
7361 resource .Test (t , resource.TestCase {
7462 PreCheck : func () { acctest .AccTestPreCheck (t ) },
7563 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
@@ -93,8 +81,8 @@ resource "google_service_account" "service_account" {
9381 account_id = "%s"
9482 display_name = "%s"
9583}
96- resource "time_sleep" "wait_10_seconds " {
97- create_duration = "10s "
84+ resource "time_sleep" "wait_30_seconds " {
85+ create_duration = "30s "
9886 depends_on = [google_service_account.service_account]
9987}
10088` , accountID , displayName )
@@ -106,8 +94,8 @@ resource "google_service_account" "service_account" {
10694 account_id = "%s"
10795 display_name = "%s"
10896}
109- resource "time_sleep" "wait_10_seconds " {
110- create_duration = "10s "
97+ resource "time_sleep" "wait_30_seconds " {
98+ create_duration = "30s "
11199 depends_on = [google_service_account.service_account]
112100}
113101
@@ -126,9 +114,6 @@ func TestAccEphemeralServiceAccountKey_fetch(t *testing.T) {
126114 resource .Test (t , resource.TestCase {
127115 PreCheck : func () { acctest .AccTestPreCheck (t ) },
128116 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
129- ExternalProviders : map [string ]resource.ExternalProvider {
130- "time" : {},
131- },
132117 Steps : []resource.TestStep {
133118 {
134119 Config : testAccEphemeralServiceAccountKey_fetch_setup (targetServiceAccountEmail ),
@@ -146,11 +131,6 @@ resource "google_service_account_key" "acceptance" {
146131 service_account_id = "%s"
147132 public_key_type = "TYPE_X509_PEM_FILE"
148133}
149-
150- resource "time_sleep" "wait_10_seconds" {
151- create_duration = "10s"
152- depends_on = [google_service_account_key.acceptance]
153- }
154134` , accountID )
155135}
156136
@@ -161,11 +141,6 @@ resource "google_service_account_key" "acceptance" {
161141 public_key_type = "TYPE_X509_PEM_FILE"
162142}
163143
164- resource "time_sleep" "wait_10_seconds" {
165- create_duration = "10s"
166- depends_on = [google_service_account_key.acceptance]
167- }
168-
169144ephemeral "google_service_account_key" "key" {
170145 name = google_service_account_key.acceptance.name
171146 fetch_key = true
0 commit comments