diff --git a/pkg/httpassert/request.go b/pkg/httpassert/request.go index 89e17fb..5bacd5a 100644 --- a/pkg/httpassert/request.go +++ b/pkg/httpassert/request.go @@ -132,6 +132,7 @@ func (s *starter) Getf(format string, a ...interface{}) Request { func (s *starter) Options(path string) Request { return s.newRequest(http.MethodOptions, path) } + func (s *starter) Optionsf(format string, a ...interface{}) Request { return s.newRequest(http.MethodOptions, fmt.Sprintf(format, a...)) } diff --git a/pkg/notifications/model.go b/pkg/notifications/model.go index 443da41..0795d43 100644 --- a/pkg/notifications/model.go +++ b/pkg/notifications/model.go @@ -39,8 +39,16 @@ const ( LevelInfo Level = "info" LevelWarning Level = "warning" LevelError Level = "error" + LevelUrgent Level = "urgent" ) +var AllowedLevels = []Level{ + LevelInfo, + LevelWarning, + LevelError, + LevelUrgent, +} + // toNotificationModel converts a Notification to the rest model for the notification service. // It also adds the current time as timestamp if it is not set. func toNotificationModel(n Notification) notificationModel {