Merge branch 'master' into feature/tests

# Conflicts:
#	pkg/util/teams/teams.go
This commit is contained in:
Murat Kabilov
2017-06-09 11:35:20 +02:00
11 changed files with 43 additions and 23 deletions
+5 -5
View File
@@ -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.
+2 -2
View File
@@ -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)
}
}
}