diff --git a/catchpoint/flatten_all_test_type.go b/catchpoint/flatten_all_test_type.go index f0f10f9..53a379d 100644 --- a/catchpoint/flatten_all_test_type.go +++ b/catchpoint/flatten_all_test_type.go @@ -97,7 +97,7 @@ func flattenScheduleSetting(scheduleSetting ScheduleSetting) []interface{} { scheduleMap := map[string]interface{}{ "run_schedule_id": scheduleSetting.RunScheduleId, "maintenance_schedule_id": scheduleSetting.MaintenanceScheduleId, - "frequency": getFrequencyId(scheduleSetting.Frequency.Id), + "frequency": getFrequencyName(scheduleSetting.Frequency.Id), "node_distribution": getNodeDistributionName(scheduleSetting.TestNodeDistribution.Id), "node_ids": nodes, "node_group_ids": nodeGroups, diff --git a/catchpoint/helper.go b/catchpoint/helper.go index f113ef0..14e5f9f 100644 --- a/catchpoint/helper.go +++ b/catchpoint/helper.go @@ -419,10 +419,10 @@ func getFrequencyName(frequency int) string { } for id, freq := range frequencies { if id == frequency { - return freq + return id, freq } } - return "" + return -1, "" } func getNodeDistributionId(nodeDistribution string) (int, string) {