mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: add missing yaml tag to mute time struct (#54287)
This commit is contained in:
committed by
GitHub
parent
3be3b02f59
commit
49b1182f34
@@ -69,8 +69,8 @@ type MuteTimingPayload struct {
|
||||
|
||||
// swagger:model
|
||||
type MuteTimeInterval struct {
|
||||
config.MuteTimeInterval
|
||||
Provenance models.Provenance `json:"provenance,omitempty"`
|
||||
config.MuteTimeInterval `json:",inline" yaml:",inline"`
|
||||
Provenance models.Provenance `json:"provenance,omitempty"`
|
||||
}
|
||||
|
||||
func (mt *MuteTimeInterval) ResourceType() string {
|
||||
|
||||
@@ -126,8 +126,9 @@ func TestConfigReader(t *testing.T) {
|
||||
require.Len(t, file[0].Policies, 2)
|
||||
})
|
||||
t.Run("a mute times file with correct properties and specific org should not error", func(t *testing.T) {
|
||||
_, err := configReader.readConfig(ctx, testFileCorrectProperties_mt)
|
||||
file, err := configReader.readConfig(ctx, testFileCorrectProperties_mt)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "test", file[0].MuteTimes[0].MuteTime.Name)
|
||||
})
|
||||
t.Run("a mute times file with correct properties and specific org should not error", func(t *testing.T) {
|
||||
file, err := configReader.readConfig(ctx, testFileCorrectPropertiesWithOrg_mt)
|
||||
|
||||
Reference in New Issue
Block a user