mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
check for sets in node pool tests (#661)
This commit is contained in:
parent
794d971695
commit
49a91427b4
@ -197,6 +197,10 @@ func testAccCheckContainerNodePoolDestroy(s *terraform.State) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var nodepoolSetFields map[string]struct{} = map[string]struct{}{
|
||||
"node_config.0.oauth_scopes": struct{}{},
|
||||
}
|
||||
|
||||
func testAccCheckContainerNodePoolMatches(n string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
config := testAccProvider.Meta().(*Config)
|
||||
@ -414,6 +418,9 @@ resource "google_container_node_pool" "np" {
|
||||
|
||||
func nodepoolCheckMatch(attributes map[string]string, attr string, gcp interface{}) string {
|
||||
if gcpList, ok := gcp.([]string); ok {
|
||||
if _, ok := nodepoolSetFields[attr]; ok {
|
||||
return nodepoolCheckSetMatch(attributes, attr, gcpList)
|
||||
}
|
||||
return nodepoolCheckListMatch(attributes, attr, gcpList)
|
||||
}
|
||||
if gcpMap, ok := gcp.(map[string]string); ok {
|
||||
|
Loading…
Reference in New Issue
Block a user