Skip to content

Commit

Permalink
fix tests for postgresql spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mkabilov committed Jul 25, 2017
1 parent dc66363 commit 8369e48
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/spec/postgresql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var unmarshalCluster = []struct {
Kind: "Postgresql",
APIVersion: "acid.zalan.do/v1",
},
Metadata: metav1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "acid-testcluster1",
},
Status: ClusterStatusInvalid,
Expand Down Expand Up @@ -187,7 +187,7 @@ var unmarshalCluster = []struct {
Kind: "Postgresql",
APIVersion: "acid.zalan.do/v1",
},
Metadata: metav1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "acid-testcluster1",
},
Spec: PostgresSpec{
Expand Down Expand Up @@ -253,7 +253,7 @@ var unmarshalCluster = []struct {
Kind: "Postgresql",
APIVersion: "acid.zalan.do/v1",
},
Metadata: metav1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "teapot-testcluster1",
},
Spec: PostgresSpec{TeamID: "acid"},
Expand Down Expand Up @@ -286,7 +286,7 @@ var postgresqlList = []struct {
Kind: "Postgresql",
APIVersion: "acid.zalan.do/v1",
},
Metadata: metav1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "acid-testcluster42",
Namespace: "default",
Labels: map[string]string{"team": "acid"},
Expand Down Expand Up @@ -445,8 +445,8 @@ func TestPostgresMeta(t *testing.T) {
t.Errorf("GetObjectKindMeta expected: %v, got: %v", tt.out.TypeMeta, a)
}

if a := tt.out.GetObjectMeta(); reflect.DeepEqual(a, tt.out.Metadata) {
t.Errorf("GetObjectMeta expected: %v, got: %v", tt.out.Metadata, a)
if a := tt.out.GetObjectMeta(); reflect.DeepEqual(a, tt.out.ObjectMeta) {
t.Errorf("GetObjectMeta expected: %v, got: %v", tt.out.ObjectMeta, a)
}
}
}
Expand Down Expand Up @@ -475,8 +475,8 @@ func TestPostgresListMeta(t *testing.T) {
t.Errorf("GetObjectKindMeta expected: %v, got: %v", tt.out.TypeMeta, a)
}

if a := tt.out.GetListMeta(); reflect.DeepEqual(a, tt.out.Metadata) {
t.Errorf("GetObjectMeta expected: %v, got: %v", tt.out.Metadata, a)
if a := tt.out.GetListMeta(); reflect.DeepEqual(a, tt.out.ListMeta) {
t.Errorf("GetObjectMeta expected: %v, got: %v", tt.out.ListMeta, a)
}

return
Expand Down

0 comments on commit 8369e48

Please sign in to comment.