From 705f3f2a38cf4c367ff063863f466f20822ae81c Mon Sep 17 00:00:00 2001 From: Sarah French <15078782+SarahFrench@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:09:28 +0100 Subject: [PATCH] Add comment to `GoogleProviderConfig` test util function (#10541) --- mmv1/third_party/terraform/acctest/provider_test_utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mmv1/third_party/terraform/acctest/provider_test_utils.go b/mmv1/third_party/terraform/acctest/provider_test_utils.go index 14fc80072a09..651b6371f682 100644 --- a/mmv1/third_party/terraform/acctest/provider_test_utils.go +++ b/mmv1/third_party/terraform/acctest/provider_test_utils.go @@ -31,6 +31,9 @@ func init() { } } +// GoogleProviderConfig returns a configured SDKv2 provider. +// This function is typically used in CheckDestroy functions in acceptance tests. The provider client is used to make GET requests to check a resource is destroyed. +// Either a preexisting configured SDKv2 provider for the given test name is returned, or a new one is configured with empty (but non-nil) terraform.ResourceConfig func GoogleProviderConfig(t *testing.T) *transport_tpg.Config { configsLock.RLock() config, ok := configs[t.Name()]