[release-12.0.3] CloudMigrations: Add Mute Timings as dependency for Notification Policies (#106884)
CloudMigrations: Add Mute Timings as dependency for Notification Policies (#106751)
(cherry picked from commit db845ed8de)
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
This commit is contained in:
co-authored by
Matheus Macabu
parent
c6ebb91eb1
commit
2dc0628b3d
@@ -24,7 +24,7 @@ var ResourceDependency = DependencyMap{
|
||||
MuteTimingType: nil,
|
||||
NotificationTemplateType: nil,
|
||||
ContactPointType: {NotificationTemplateType},
|
||||
NotificationPolicyType: {ContactPointType},
|
||||
NotificationPolicyType: {ContactPointType, MuteTimingType},
|
||||
AlertRuleType: {DatasourceDataType, FolderDataType, DashboardDataType, MuteTimingType, ContactPointType, NotificationPolicyType},
|
||||
AlertRuleGroupType: {AlertRuleType},
|
||||
}
|
||||
|
||||
@@ -144,10 +144,11 @@ func TestResourceDependencyParse(t *testing.T) {
|
||||
NotificationPolicyType,
|
||||
ContactPointType,
|
||||
NotificationTemplateType,
|
||||
MuteTimingType,
|
||||
}
|
||||
result, err := ResourceDependency.Parse(input)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, result, 3)
|
||||
require.Len(t, result, len(input))
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user