mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +00:00
Check error in SQL user test.
This fixes a panic in our tests.
This commit is contained in:
parent
e58e099b1a
commit
179e075d72
|
@ -91,6 +91,10 @@ func testAccCheckGoogleSqlUserExists(n string) resource.TestCheckFunc {
|
|||
users, err := config.clientSqlAdmin.Users.List(config.Project,
|
||||
instance).Do()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, user := range users.Items {
|
||||
if user.Name == name && user.Host == host {
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user