-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move various files into correct locations, including moving test file…
…s into location so they're used in the downstream (#7505) (#14063) * Move data source file into correct location * Rename data source test file to match conventions * Move handwritten tests into correct folder Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
6e6975e
commit 5cd80a9
Showing
4 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:none | ||
|
||
``` |
File renamed without changes.
67 changes: 67 additions & 0 deletions
67
google/resource_certificate_manager_dns_authorization_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package google | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
) | ||
|
||
func TestAccCertificateManagerDnsAuthorization_update(t *testing.T) { | ||
t.Parallel() | ||
|
||
context := map[string]interface{}{ | ||
"random_suffix": RandString(t, 10), | ||
} | ||
|
||
VcrTest(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
ProtoV5ProviderFactories: ProtoV5ProviderFactories(t), | ||
CheckDestroy: testAccCheckCertificateManagerDnsAuthorizationDestroyProducer(t), | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccCertificateManagerDnsAuthorization_update0(context), | ||
}, | ||
{ | ||
ResourceName: "google_certificate_manager_dns_authorization.default", | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
ImportStateVerifyIgnore: []string{"name"}, | ||
}, | ||
{ | ||
Config: testAccCertificateManagerDnsAuthorization_update1(context), | ||
}, | ||
{ | ||
ResourceName: "google_certificate_manager_dns_authorization.default", | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
ImportStateVerifyIgnore: []string{"name"}, | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
func testAccCertificateManagerDnsAuthorization_update0(context map[string]interface{}) string { | ||
return Nprintf(` | ||
resource "google_certificate_manager_dns_authorization" "default" { | ||
name = "tf-test-dns-auth%{random_suffix}" | ||
description = "The default dnss" | ||
labels = { | ||
a = "a" | ||
} | ||
domain = "%{random_suffix}.hashicorptest.com" | ||
} | ||
`, context) | ||
} | ||
|
||
func testAccCertificateManagerDnsAuthorization_update1(context map[string]interface{}) string { | ||
return Nprintf(` | ||
resource "google_certificate_manager_dns_authorization" "default" { | ||
name = "tf-test-dns-auth%{random_suffix}" | ||
description = "The default dnss2" | ||
labels = { | ||
a = "b" | ||
} | ||
domain = "%{random_suffix}.hashicorptest.com" | ||
} | ||
`, context) | ||
} |
58 changes: 58 additions & 0 deletions
58
google/resource_network_services_edge_cache_keyset_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package google | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
) | ||
|
||
func TestAccNetworkServicesEdgeCacheKeyset_update(t *testing.T) { | ||
t.Parallel() | ||
|
||
context := map[string]interface{}{ | ||
"random_suffix": RandString(t, 10), | ||
} | ||
|
||
VcrTest(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
ProtoV5ProviderFactories: ProtoV5ProviderFactories(t), | ||
CheckDestroy: testAccCheckNetworkServicesEdgeCacheKeysetDestroyProducer(t), | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccNetworkServicesEdgeCacheKeyset_networkServicesEdgeCacheKeysetBasicExample(context), | ||
}, | ||
{ | ||
ResourceName: "google_network_services_edge_cache_keyset.default", | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
ImportStateVerifyIgnore: []string{"name"}, | ||
}, | ||
{ | ||
Config: testAccNetworkServicesEdgeCacheKeyset_update(context), | ||
}, | ||
{ | ||
ResourceName: "google_network_services_edge_cache_keyset.default", | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
ImportStateVerifyIgnore: []string{"name"}, | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
func testAccNetworkServicesEdgeCacheKeyset_update(context map[string]interface{}) string { | ||
return Nprintf(` | ||
resource "google_network_services_edge_cache_keyset" "default" { | ||
name = "default%{random_suffix}" | ||
description = "T2" | ||
public_key { | ||
id = "my-public-key-2" | ||
value = "hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM" | ||
} | ||
labels = { | ||
a = "a" | ||
} | ||
} | ||
`, context) | ||
} |