refactor!(notifications): drop URM and Org services from NotificationRuleService interface definition (#18131)

pull/18177/head
George 2020-05-20 15:10:09 +01:00 committed by GitHub
parent 876a89a348
commit 0186fed3ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 25 deletions

View File

@ -35,12 +35,6 @@ type NotificationRule interface {
// NotificationRuleStore represents a service for managing notification rule.
type NotificationRuleStore interface {
// UserResourceMappingService must be part of all NotificationRuleStore service,
// for create, search, delete.
UserResourceMappingService
// OrganizationService is needed for search filter
OrganizationService
// FindNotificationRuleByID returns a single notification rule by ID.
FindNotificationRuleByID(ctx context.Context, id ID) (NotificationRule, error)

View File

@ -346,14 +346,6 @@ func CreateNotificationRule(
if diff := cmp.Diff(nrs, tt.wants.notificationRules, notificationRuleCmpOptions...); diff != "" {
t.Errorf("notificationRules are different -got/+want\ndiff %s", diff)
}
urms, _, err := s.FindUserResourceMappings(ctx, urmFilter)
if err != nil {
t.Fatalf("failed to retrieve user resource mappings: %v", err)
}
if diff := cmp.Diff(urms, tt.wants.userResourceMapping, userResourceMappingCmpOptions...); diff != "" {
t.Errorf("user resource mappings are different -got/+want\ndiff %s", diff)
}
})
}
}
@ -2710,17 +2702,6 @@ func DeleteNotificationRule(
if diff := cmp.Diff(nrs, tt.wants.notificationRules, notificationRuleCmpOptions...); diff != "" {
t.Errorf("notification rules are different -got/+want\ndiff %s", diff)
}
urms, _, err := s.FindUserResourceMappings(ctx, influxdb.UserResourceMappingFilter{
UserID: tt.args.userID,
ResourceType: influxdb.NotificationRuleResourceType,
})
if err != nil {
t.Fatalf("failed to retrieve user resource mappings: %v", err)
}
if diff := cmp.Diff(urms, tt.wants.userResourceMappings, userResourceMappingCmpOptions...); diff != "" {
t.Errorf("user resource mappings are different -got/+want\ndiff %s", diff)
}
})
}
}