mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Check that org listpolicy isn't nil.
Fix a panic in our test that is caused by a ListPolicy being nil. I assume, but cannot verify, that this is an API change in that it may now send back a nil listpolicy if a default is used.
This commit is contained in:
parent
e58e099b1a
commit
1a169a5900
@ -169,6 +169,10 @@ func testAccCheckGoogleProjectOrganizationListPolicyAll(n, policyType string) re
|
||||
return err
|
||||
}
|
||||
|
||||
if policy.ListPolicy == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(policy.ListPolicy.AllowedValues) > 0 || len(policy.ListPolicy.DeniedValues) > 0 {
|
||||
return fmt.Errorf("The `values` field shouldn't be set")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user