mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 20:28:57 +02:00
Merge branch 'master' into feature/tests
# Conflicts: # pkg/util/teams/teams.go
This commit is contained in:
@@ -135,12 +135,12 @@ func (m *MaintenanceWindow) MarshalJSON() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf("\"%s-%s\"",
|
||||
m.StartTime.Format("15:04"),
|
||||
m.EndTime.Format("15:04"))), nil
|
||||
} else {
|
||||
return []byte(fmt.Sprintf("\"%s:%s-%s\"",
|
||||
m.Weekday.String()[:3],
|
||||
m.StartTime.Format("15:04"),
|
||||
m.EndTime.Format("15:04"))), nil
|
||||
}
|
||||
|
||||
return []byte(fmt.Sprintf("\"%s:%s-%s\"",
|
||||
m.Weekday.String()[:3],
|
||||
m.StartTime.Format("15:04"),
|
||||
m.EndTime.Format("15:04"))), nil
|
||||
}
|
||||
|
||||
// UnmarshalJSON convets a JSON to the maintenance window definition.
|
||||
|
||||
@@ -282,7 +282,7 @@ var postgresqlList = []struct {
|
||||
Kind: "List",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
Items: []Postgresql{Postgresql{
|
||||
Items: []Postgresql{{
|
||||
TypeMeta: unversioned.TypeMeta{
|
||||
Kind: "Postgresql",
|
||||
APIVersion: "acid.zalan.do/v1",
|
||||
@@ -382,7 +382,7 @@ func TestUnmarshalMaintenanceWindow(t *testing.T) {
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(m, tt.out) {
|
||||
t.Errorf("Expected maintenace window: %#v, got: %#v", tt.out, m)
|
||||
t.Errorf("Expected maintenance window: %#v, got: %#v", tt.out, m)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user