Skip to content

Commit

Permalink
cleanup redundant calls/assignations
Browse files Browse the repository at this point in the history
  • Loading branch information
oboukili committed Jun 1, 2020
1 parent bb330c7 commit 72c7170
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gitlab/resource_gitlab_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,19 @@ func testAccCheckGitlabGroupDisappears(group *gitlab.Group) resource.TestCheckFu
}
// Fixes groups API async deletion issue
// https://github.com/terraform-providers/terraform-provider-gitlab/issues/319
g, resp, err := conn.Groups.GetGroup(group.ID)
for {
g, resp, err = conn.Groups.GetGroup(group.ID)
g, resp, err := conn.Groups.GetGroup(group.ID)
if resp != nil && resp.StatusCode == http.StatusNotFound {
return nil
}
if g != nil && g.MarkedForDeletionOn != nil {
return nil
}
if err != nil {
break
return err
}
g = nil
}
return err
}
}

Expand Down

0 comments on commit 72c7170

Please sign in to comment.