Skip to content

Commit

Permalink
[SYNTH-14611] Fix renotify_interval drift when saving from UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Drarig29 authored and nkzou committed Jul 5, 2024
1 parent ba28000 commit 751e52e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions datadog/resource_datadog_synthetics_test_.go
Original file line number Diff line number Diff line change
Expand Up @@ -2936,11 +2936,17 @@ func buildLocalOptions(actualOptions datadogV1.SyntheticsTestOptions) []map[stri
}
if actualOptions.HasMonitorOptions() {
actualMonitorOptions := actualOptions.GetMonitorOptions()
renotifyInterval := actualMonitorOptions.GetRenotifyInterval()

optionsListMonitorOptions := make(map[string]int64)
optionsListMonitorOptions["renotify_interval"] = renotifyInterval
localOptionsList["monitor_options"] = []map[string]int64{optionsListMonitorOptions}
shouldUpdate := false

if actualMonitorOptions.HasRenotifyInterval() {
optionsListMonitorOptions["renotify_interval"] = actualMonitorOptions.GetRenotifyInterval()
shouldUpdate = true
}

if shouldUpdate {
localOptionsList["monitor_options"] = []map[string]int64{optionsListMonitorOptions}
}
}
if actualOptions.HasNoScreenshot() {
localOptionsList["no_screenshot"] = actualOptions.GetNoScreenshot()
Expand Down

0 comments on commit 751e52e

Please sign in to comment.