@@ -223,7 +223,7 @@ func TestReconcilePGBackRest(t *testing.T) {
223223
224224	// set status 
225225	postgresCluster .Status  =  v1beta1.PostgresClusterStatus {
226- 		Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
226+ 		Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
227227		PGBackRest : & v1beta1.PGBackRestStatus {
228228			RepoHost : & v1beta1.RepoHostStatus {Ready : true },
229229			Repos :    []v1beta1.RepoStatus {{Name : "repo1" , StanzaCreated : true }}},
@@ -539,7 +539,7 @@ func TestReconcilePGBackRest(t *testing.T) {
539539
540540		// set status 
541541		postgresCluster .Status  =  v1beta1.PostgresClusterStatus {
542- 			Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
542+ 			Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
543543			PGBackRest : & v1beta1.PGBackRestStatus {
544544				Repos : []v1beta1.RepoStatus {{Name : "repo1" , StanzaCreated : true }}},
545545		}
@@ -828,7 +828,7 @@ func TestReconcileStanzaCreate(t *testing.T) {
828828		Reason :             "RepoHostReady" ,
829829		Message :            "pgBackRest dedicated repository host is ready" ,
830830	})
831- 	postgresCluster .Status .Patroni  =  & v1beta1.PatroniStatus {
831+ 	postgresCluster .Status .Patroni  =  v1beta1.PatroniStatus {
832832		SystemIdentifier : "6952526174828511264" ,
833833	}
834834
@@ -977,7 +977,7 @@ func TestReconcileReplicaCreateBackup(t *testing.T) {
977977		Reason :             "StanzaCreated" ,
978978		Message :            "pgBackRest replica create repo is ready for backups" ,
979979	})
980- 	postgresCluster .Status .Patroni  =  & v1beta1.PatroniStatus {
980+ 	postgresCluster .Status .Patroni  =  v1beta1.PatroniStatus {
981981		SystemIdentifier : "6952526174828511264" ,
982982	}
983983
@@ -2162,7 +2162,7 @@ func TestReconcilePostgresClusterDataSource(t *testing.T) {
21622162				cluster .Spec .DataSource  =  tc .dataSource 
21632163				assert .NilError (t , tClient .Create (ctx , cluster ))
21642164				if  tc .clusterBootstrapped  {
2165- 					cluster .Status .Patroni  =  & v1beta1.PatroniStatus {
2165+ 					cluster .Status .Patroni  =  v1beta1.PatroniStatus {
21662166						SystemIdentifier : "123456789" ,
21672167					}
21682168				}
@@ -2952,7 +2952,7 @@ func TestPrepareForRestore(t *testing.T) {
29522952				}
29532953				clusterUID  :=  clusterName 
29542954				cluster  :=  fakePostgresCluster (clusterName , namespace , clusterUID , dedicated )
2955- 				cluster .Status .Patroni  =  & v1beta1.PatroniStatus {SystemIdentifier : "abcde12345" }
2955+ 				cluster .Status .Patroni  =  v1beta1.PatroniStatus {SystemIdentifier : "abcde12345" }
29562956				cluster .Status .Proxy .PGBouncer .PostgreSQLRevision  =  "abcde12345" 
29572957				cluster .Status .Monitoring .ExporterConfiguration  =  "abcde12345" 
29582958				meta .SetStatusCondition (& cluster .Status .Conditions , metav1.Condition {
@@ -3026,7 +3026,7 @@ func TestPrepareForRestore(t *testing.T) {
30263026						assert .Equal (t , tc .result .expectedClusterCondition .Message , condition .Message )
30273027					}
30283028					if  tc .result .expectedClusterCondition .Reason  ==  ReasonReadyForRestore  {
3029- 						assert .Assert (t , cluster .Status .Patroni  ==  nil )
3029+ 						assert .Assert (t , cluster .Status .Patroni . SystemIdentifier  ==  "" )
30303030						assert .Assert (t , cluster .Status .Proxy .PGBouncer .PostgreSQLRevision  ==  "" )
30313031						assert .Assert (t , cluster .Status .Monitoring .ExporterConfiguration  ==  "" )
30323032						assert .Assert (t , meta .FindStatusCondition (cluster .Status .Conditions ,
@@ -3089,7 +3089,7 @@ func TestReconcileScheduledBackups(t *testing.T) {
30893089				ConditionReplicaCreate : metav1 .ConditionTrue ,
30903090			},
30913091			status : & v1beta1.PostgresClusterStatus {
3092- 				Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
3092+ 				Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
30933093				PGBackRest : & v1beta1.PGBackRestStatus {
30943094					Repos : []v1beta1.RepoStatus {{Name : "repo1" , StanzaCreated : true }}},
30953095			},
@@ -3107,7 +3107,7 @@ func TestReconcileScheduledBackups(t *testing.T) {
31073107			testDesc :      "no repo host ready condition, should not reconcile" ,
31083108			dedicatedOnly : true ,
31093109			status : & v1beta1.PostgresClusterStatus {
3110- 				Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
3110+ 				Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
31113111				PGBackRest : & v1beta1.PGBackRestStatus {
31123112					Repos : []v1beta1.RepoStatus {{Name : "repo1" , StanzaCreated : true }}},
31133113			},
@@ -3116,7 +3116,7 @@ func TestReconcileScheduledBackups(t *testing.T) {
31163116		}, {
31173117			testDesc : "no replica create condition, should not reconcile" ,
31183118			status : & v1beta1.PostgresClusterStatus {
3119- 				Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
3119+ 				Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
31203120				PGBackRest : & v1beta1.PGBackRestStatus {
31213121					Repos : []v1beta1.RepoStatus {{Name : "repo1" , StanzaCreated : true }}},
31223122			},
@@ -3126,7 +3126,7 @@ func TestReconcileScheduledBackups(t *testing.T) {
31263126			testDesc :      "false repo host ready condition, should not reconcile" ,
31273127			dedicatedOnly : true ,
31283128			status : & v1beta1.PostgresClusterStatus {
3129- 				Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
3129+ 				Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
31303130				PGBackRest : & v1beta1.PGBackRestStatus {
31313131					Repos : []v1beta1.RepoStatus {{Name : "repo1" , StanzaCreated : true }}},
31323132			},
@@ -3135,7 +3135,7 @@ func TestReconcileScheduledBackups(t *testing.T) {
31353135		}, {
31363136			testDesc : "false replica create condition, should not reconcile" ,
31373137			status : & v1beta1.PostgresClusterStatus {
3138- 				Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
3138+ 				Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
31393139				PGBackRest : & v1beta1.PGBackRestStatus {
31403140					Repos : []v1beta1.RepoStatus {{Name : "repo1" , StanzaCreated : true }}},
31413141			},
@@ -3148,7 +3148,7 @@ func TestReconcileScheduledBackups(t *testing.T) {
31483148				ConditionReplicaCreate : metav1 .ConditionTrue ,
31493149			},
31503150			status : & v1beta1.PostgresClusterStatus {
3151- 				Patroni : & v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
3151+ 				Patroni : v1beta1.PatroniStatus {SystemIdentifier : "12345abcde" },
31523152				PGBackRest : & v1beta1.PGBackRestStatus {
31533153					Repos : []v1beta1.RepoStatus {}},
31543154			},
0 commit comments