Fix an issue when not assigning the merge result.

Add some tests.
This commit is contained in:
Oleksii Kliukin
2017-12-04 10:49:25 +01:00
parent 831ebb1f32
commit 611cfe96d6
4 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ type CloneDescription struct {
EndTimestamp string `json:"timestamp,omitempty"`
}
type userFlags []string
type UserFlags []string
// PostgresStatus contains status of the PostgreSQL cluster (running, creation failed etc.)
type PostgresStatus string
@@ -99,7 +99,7 @@ type PostgresSpec struct {
UseLoadBalancer *bool `json:"useLoadBalancer,omitempty"`
ReplicaLoadBalancer bool `json:"replicaLoadBalancer,omitempty"`
NumberOfInstances int32 `json:"numberOfInstances"`
Users map[string]userFlags `json:"users"`
Users map[string]UserFlags `json:"users"`
MaintenanceWindows []MaintenanceWindow `json:"maintenanceWindows,omitempty"`
Clone CloneDescription `json:"clone"`
ClusterName string `json:"-"`
+1 -1
View File
@@ -226,7 +226,7 @@ var unmarshalCluster = []struct {
TeamID: "ACID",
AllowedSourceRanges: []string{"127.0.0.1/32"},
NumberOfInstances: 2,
Users: map[string]userFlags{"zalando": {"superuser", "createdb"}},
Users: map[string]UserFlags{"zalando": {"superuser", "createdb"}},
MaintenanceWindows: []MaintenanceWindow{{
Everyday: false,
Weekday: time.Monday,