Skip to content

Commit

Permalink
ignore StatusBadGateway and GW timouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Oren committed Feb 14, 2023
1 parent 7d83252 commit e26ff9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

const run_this_test = true
const run_this_test = false

func TestAcc_MongoDBFlexUser(t *testing.T) {
if !common.ShouldAccTestRun(run_this_test) {
Expand Down
4 changes: 3 additions & 1 deletion stackit/internal/resources/postgres-flex/instance/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ func (r Resource) createUser(ctx context.Context, plan *Instance, d *diag.Diagno
return
}
if (res.StatusCode() == http.StatusNotFound ||
res.StatusCode() == http.StatusBadRequest) &&
res.StatusCode() == http.StatusBadRequest ||
res.StatusCode() == http.StatusBadGateway ||
res.StatusCode() == http.StatusGatewayTimeout) &&
maxTries > 0 {
time.Sleep(time.Second * 30)
continue
Expand Down

0 comments on commit e26ff9c

Please sign in to comment.