Skip to content

Commit 24b381b

Browse files
committed
SUMO-253872: Update tests and clean up frequency where unused
1 parent a19b778 commit 24b381b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

sumologic/resource_sumologic_monitors_library_monitor.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,6 @@ func triggerConditionsBlockToJson(block map[string]interface{}) []TriggerConditi
12051205

12061206
func logsStaticConditionBlockToJson(block map[string]interface{}) []TriggerCondition {
12071207
base := TriggerCondition{
1208-
Frequency: block["frequency"].(string),
12091208
Field: block["field"].(string),
12101209
DetectionMethod: logsStaticConditionDetectionMethod,
12111210
}
@@ -1722,7 +1721,6 @@ func jsonToMetricsMissingDataConditionBlock(conditions []TriggerCondition) map[s
17221721
block := map[string]interface{}{}
17231722
firstCondition := conditions[0]
17241723
block["time_range"] = firstCondition.PositiveTimeRange()
1725-
block["frequency"] = firstCondition.Frequency
17261724
block["trigger_source"] = firstCondition.TriggerSource
17271725
return block
17281726
}

sumologic/resource_sumologic_monitors_library_monitor_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ func TestAccSumologicMonitorsLibraryMonitor_create_with_no_resolution_window(t *
299299
ThresholdType: "GreaterThan",
300300
Threshold: 40.0,
301301
TimeRange: "15m",
302-
Frequency: "5m",
303302
OccurrenceType: "ResultCount",
304303
TriggerSource: "AllResults",
305304
TriggerType: "Critical",
@@ -309,7 +308,6 @@ func TestAccSumologicMonitorsLibraryMonitor_create_with_no_resolution_window(t *
309308
ThresholdType: "LessThanOrEqual",
310309
Threshold: 40.0,
311310
TimeRange: "15m",
312-
Frequency: "5m",
313311
OccurrenceType: "ResultCount",
314312
TriggerSource: "AllResults",
315313
TriggerType: "ResolvedCritical",
@@ -329,7 +327,6 @@ func TestAccSumologicMonitorsLibraryMonitor_create_with_no_resolution_window(t *
329327
testAccCheckMonitorsLibraryMonitorAttributes("sumologic_monitor.test"),
330328
resource.TestCheckResourceAttr("sumologic_monitor.test", "triggers.0.trigger_type", testTriggers[0].TriggerType),
331329
resource.TestCheckResourceAttr("sumologic_monitor.test", "triggers.0.time_range", testTriggers[0].TimeRange),
332-
resource.TestCheckResourceAttr("sumologic_monitor.test", "triggers.0.frequency", testTriggers[0].Frequency),
333330
),
334331
},
335332
},
@@ -907,7 +904,6 @@ func testAccSumologicMonitorsLibraryMonitorWithNoResolutionWindow(testName strin
907904
threshold_type = "GreaterThan"
908905
threshold = 40.0
909906
time_range = "15m"
910-
frequency = "5m"
911907
occurrence_type = "ResultCount"
912908
trigger_source = "AllResults"
913909
trigger_type = "Critical"
@@ -917,7 +913,6 @@ func testAccSumologicMonitorsLibraryMonitorWithNoResolutionWindow(testName strin
917913
threshold_type = "LessThanOrEqual"
918914
threshold = 40.0
919915
time_range = "15m"
920-
frequency = "5m"
921916
occurrence_type = "ResultCount"
922917
trigger_source = "AllResults"
923918
trigger_type = "ResolvedCritical"
@@ -1311,6 +1306,7 @@ var exampleLogsStaticTriggerConditionBlock = `
13111306
logs_static_condition {
13121307
critical {
13131308
time_range = "60m"
1309+
frequency = "5m"
13141310
alert {
13151311
threshold = 100.0
13161312
threshold_type = "GreaterThan"
@@ -1327,6 +1323,7 @@ var exampleLogsStaticTriggerConditionBlockWithResolutionWindow = `
13271323
logs_static_condition {
13281324
critical {
13291325
time_range = "1h"
1326+
frequency = "5m"
13301327
alert {
13311328
threshold = 100.0
13321329
threshold_type = "GreaterThan"

0 commit comments

Comments
 (0)