Skip to content

Commit 5a67add

Browse files
committed
Remove Cloud Run worker pools custome audience test, as custom audience test is n/a to the WorkerPool. API change has been made to ignore the custom audience input and test is not needed anymore.
1 parent 9db71ee commit 5a67add

1 file changed

Lines changed: 0 additions & 76 deletions

File tree

mmv1/third_party/terraform/services/cloudrunv2/resource_cloud_run_v2_worker_pool_test.go

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -340,82 +340,6 @@ resource "google_cloud_run_v2_worker_pool" "default" {
340340
`, context)
341341
}
342342

343-
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolCustomAudienceUpdate(t *testing.T) {
344-
t.Parallel()
345-
346-
workerPoolName := fmt.Sprintf("tf-test-cloudrun-worker-pool%s", acctest.RandString(t, 10))
347-
348-
acctest.VcrTest(t, resource.TestCase{
349-
PreCheck: func() { acctest.AccTestPreCheck(t) },
350-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
351-
CheckDestroy: testAccCheckCloudRunV2WorkerPoolDestroyProducer(t),
352-
Steps: []resource.TestStep{
353-
{
354-
Config: testAccCloudRunV2WorkerPool_cloudRunWorkerPoolUpdateWithCustomAudience(workerPoolName, "test"),
355-
},
356-
{
357-
ResourceName: "google_cloud_run_v2_worker_pool.default",
358-
ImportState: true,
359-
ImportStateVerify: true,
360-
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "launch_stage", "deletion_protection"},
361-
},
362-
{
363-
Config: testAccCloudRunV2WorkerPool_cloudRunWorkerPoolUpdateWithCustomAudience(workerPoolName, "test_update"),
364-
},
365-
{
366-
ResourceName: "google_cloud_run_v2_worker_pool.default",
367-
ImportState: true,
368-
ImportStateVerify: true,
369-
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "launch_stage", "deletion_protection"},
370-
},
371-
{
372-
Config: testAccCloudRunV2WorkerPool_cloudRunWorkerPoolUpdateWithoutCustomAudience(workerPoolName),
373-
},
374-
{
375-
ResourceName: "google_cloud_run_v2_worker_pool.default",
376-
ImportState: true,
377-
ImportStateVerify: true,
378-
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "launch_stage", "deletion_protection"},
379-
},
380-
},
381-
})
382-
}
383-
384-
func testAccCloudRunV2WorkerPool_cloudRunWorkerPoolUpdateWithoutCustomAudience(workerPoolName string) string {
385-
return fmt.Sprintf(`
386-
resource "google_cloud_run_v2_worker_pool" "default" {
387-
name = "%s"
388-
location = "us-central1"
389-
deletion_protection = false
390-
launch_stage = "BETA"
391-
392-
template {
393-
containers {
394-
image = "us-docker.pkg.dev/cloudrun/container/worker-pool"
395-
}
396-
}
397-
}
398-
`, workerPoolName)
399-
}
400-
401-
func testAccCloudRunV2WorkerPool_cloudRunWorkerPoolUpdateWithCustomAudience(workerPoolName string, customAudience string) string {
402-
return fmt.Sprintf(`
403-
resource "google_cloud_run_v2_worker_pool" "default" {
404-
name = "%s"
405-
location = "us-central1"
406-
deletion_protection = false
407-
custom_audiences = ["%s"]
408-
launch_stage = "BETA"
409-
410-
template {
411-
containers {
412-
image = "us-docker.pkg.dev/cloudrun/container/worker-pool"
413-
}
414-
}
415-
}
416-
`, workerPoolName, customAudience)
417-
}
418-
419343
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolAttributionLabel(t *testing.T) {
420344
t.Parallel()
421345

0 commit comments

Comments
 (0)