Skip to content

Commit

Permalink
Fix some failing integration tests for OVH
Browse files Browse the repository at this point in the history
When all corrections are non modifying corrections (ie report only), we
don't need to add the REFRESH ZONE correction.
This was making some of the IGNORE integration test failed because the
test system was checking for 0 corrections applied.
  • Loading branch information
masterzen committed Nov 26, 2023
1 parent df9f939 commit fab1fad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion providers/ovh/ovhProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,16 @@ func (c *ovhProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, actual
return nil, err
}

if len(corrections) > 0 {
// Only refresh zone if there's a real modification
reportOnlyCorrections := true
for _, c := range corrections {
if c.F != nil {
reportOnlyCorrections = false
break
}
}

if !reportOnlyCorrections {
corrections = append(corrections, &models.Correction{
Msg: "REFRESH zone " + dc.Name,
F: func() error {
Expand Down

0 comments on commit fab1fad

Please sign in to comment.