@@ -137,8 +137,8 @@ func TestCustomLabels(t *testing.T) {
137
137
138
138
t .Run ("Cluster" , func (t * testing.T ) {
139
139
cluster := testCluster ()
140
- cluster .ObjectMeta . Name = "global-cluster"
141
- cluster .ObjectMeta . Namespace = ns .Name
140
+ cluster .Name = "global-cluster"
141
+ cluster .Namespace = ns .Name
142
142
cluster .Spec .InstanceSets = []v1beta1.PostgresInstanceSetSpec {{
143
143
Name : "daisy-instance1" ,
144
144
Replicas : initialize .Int32 (1 ),
@@ -185,8 +185,8 @@ func TestCustomLabels(t *testing.T) {
185
185
186
186
t .Run ("Instance" , func (t * testing.T ) {
187
187
cluster := testCluster ()
188
- cluster .ObjectMeta . Name = "instance-cluster"
189
- cluster .ObjectMeta . Namespace = ns .Name
188
+ cluster .Name = "instance-cluster"
189
+ cluster .Namespace = ns .Name
190
190
cluster .Spec .InstanceSets = []v1beta1.PostgresInstanceSetSpec {{
191
191
Name : "max-instance" ,
192
192
Replicas : initialize .Int32 (1 ),
@@ -236,8 +236,8 @@ func TestCustomLabels(t *testing.T) {
236
236
237
237
t .Run ("PGBackRest" , func (t * testing.T ) {
238
238
cluster := testCluster ()
239
- cluster .ObjectMeta . Name = "pgbackrest-cluster"
240
- cluster .ObjectMeta . Namespace = ns .Name
239
+ cluster .Name = "pgbackrest-cluster"
240
+ cluster .Namespace = ns .Name
241
241
cluster .Spec .Backups .PGBackRest .Metadata = & v1beta1.Metadata {
242
242
Labels : map [string ]string {"my.pgbackrest.label" : "lucy" },
243
243
}
@@ -280,8 +280,8 @@ func TestCustomLabels(t *testing.T) {
280
280
281
281
t .Run ("PGBouncer" , func (t * testing.T ) {
282
282
cluster := testCluster ()
283
- cluster .ObjectMeta . Name = "pgbouncer-cluster"
284
- cluster .ObjectMeta . Namespace = ns .Name
283
+ cluster .Name = "pgbouncer-cluster"
284
+ cluster .Namespace = ns .Name
285
285
cluster .Spec .Proxy .PGBouncer .Metadata = & v1beta1.Metadata {
286
286
Labels : map [string ]string {"my.pgbouncer.label" : "lucy" },
287
287
}
@@ -375,8 +375,8 @@ func TestCustomAnnotations(t *testing.T) {
375
375
376
376
t .Run ("Cluster" , func (t * testing.T ) {
377
377
cluster := testCluster ()
378
- cluster .ObjectMeta . Name = "global-cluster"
379
- cluster .ObjectMeta . Namespace = ns .Name
378
+ cluster .Name = "global-cluster"
379
+ cluster .Namespace = ns .Name
380
380
cluster .Spec .InstanceSets = []v1beta1.PostgresInstanceSetSpec {{
381
381
Name : "daisy-instance1" ,
382
382
Replicas : initialize .Int32 (1 ),
@@ -424,8 +424,8 @@ func TestCustomAnnotations(t *testing.T) {
424
424
425
425
t .Run ("Instance" , func (t * testing.T ) {
426
426
cluster := testCluster ()
427
- cluster .ObjectMeta . Name = "instance-cluster"
428
- cluster .ObjectMeta . Namespace = ns .Name
427
+ cluster .Name = "instance-cluster"
428
+ cluster .Namespace = ns .Name
429
429
cluster .Spec .InstanceSets = []v1beta1.PostgresInstanceSetSpec {{
430
430
Name : "max-instance" ,
431
431
Replicas : initialize .Int32 (1 ),
@@ -475,8 +475,8 @@ func TestCustomAnnotations(t *testing.T) {
475
475
476
476
t .Run ("PGBackRest" , func (t * testing.T ) {
477
477
cluster := testCluster ()
478
- cluster .ObjectMeta . Name = "pgbackrest-cluster"
479
- cluster .ObjectMeta . Namespace = ns .Name
478
+ cluster .Name = "pgbackrest-cluster"
479
+ cluster .Namespace = ns .Name
480
480
cluster .Spec .Backups .PGBackRest .Metadata = & v1beta1.Metadata {
481
481
Annotations : map [string ]string {"my.pgbackrest.annotation" : "lucy" },
482
482
}
@@ -519,8 +519,8 @@ func TestCustomAnnotations(t *testing.T) {
519
519
520
520
t .Run ("PGBouncer" , func (t * testing.T ) {
521
521
cluster := testCluster ()
522
- cluster .ObjectMeta . Name = "pgbouncer-cluster"
523
- cluster .ObjectMeta . Namespace = ns .Name
522
+ cluster .Name = "pgbouncer-cluster"
523
+ cluster .Namespace = ns .Name
524
524
cluster .Spec .Proxy .PGBouncer .Metadata = & v1beta1.Metadata {
525
525
Annotations : map [string ]string {"my.pgbouncer.annotation" : "lucy" },
526
526
}
@@ -768,12 +768,12 @@ type: ClusterIP
768
768
assert .NilError (t , err )
769
769
770
770
// Annotations present in the metadata.
771
- assert .Assert (t , cmp .MarshalMatches (service .ObjectMeta . Annotations , `
771
+ assert .Assert (t , cmp .MarshalMatches (service .Annotations , `
772
772
some: note
773
773
` ))
774
774
775
775
// Labels present in the metadata.
776
- assert .Assert (t , cmp .MarshalMatches (service .ObjectMeta . Labels , `
776
+ assert .Assert (t , cmp .MarshalMatches (service .Labels , `
777
777
happy: label
778
778
postgres-operator.crunchydata.com/cluster: pg2
779
779
postgres-operator.crunchydata.com/role: replica
0 commit comments