Skip to content

Commit

Permalink
Add received 429 status test on TestGoDaddyZones
Browse files Browse the repository at this point in the history
  • Loading branch information
rayshoo committed Nov 15, 2024
1 parent 67ff232 commit 1373bd2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion provider/godaddy/godaddy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ func TestGoDaddyZones(t *testing.T) {
assert.Error(err)
assert.Nil(domains)
client.AssertExpectations(t)

// 429 Error(monthly quota exceeded) on getting zones
client.On("Get", domainsURI).Return(APIError{
Code: "QUOTA_EXCEEDED",
Message: "The monthly quota for requests has been exceeded.",
}, nil).Once()

_, err = provider.zones()

assert.NoError(err)
}

func TestGoDaddyZoneRecords(t *testing.T) {
Expand Down Expand Up @@ -445,4 +455,4 @@ func TestGoDaddyErrorResponse(t *testing.T) {
assert.Error(provider.ApplyChanges(context.TODO(), &changes))

client.AssertExpectations(t)
}
}

0 comments on commit 1373bd2

Please sign in to comment.