CloudMigrations: Add Mute Timings as dependency for Notification Policies (#106751)
This commit is contained in:
@@ -109,7 +109,7 @@ After connecting to the cloud stack, this is the empty state of the migration as
|
||||
| Folders | Nothing else |
|
||||
| All Alert rule groups | All other resources |
|
||||
| Alert Rules | <ul><li>Dashboards</li> <li>Library Elements</li> <li>Data Sources</li> <li>Plugins</li> <li>Folders</li> <li>Notification Policies</li> <li>Notification Templates</li> <li>Contact Points</li> <li>Mute Timings</li></ul> |
|
||||
| Notification Policies | <ul><li>Notification Templates</li> <li>Contact Points</li></ul> |
|
||||
| Notification Policies | <ul><li>Notification Templates</li> <li>Contact Points</li> <li>Mute Timings</li></ul> |
|
||||
| Notification Templates | Nothing else |
|
||||
| Contact Points | Notification Templates |
|
||||
| Mute Timings | Nothing else |
|
||||
|
||||
@@ -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