Skip to content

Commit a9b677c

Browse files
RafiaSabihRafia Sabih
andauthored
Use fake client for connection pooler (zalando#1301)
Connection pooler creation, deletion, and synchronization now tested using fake client API. Co-authored-by: Rafia Sabih <[email protected]>
1 parent 2b45478 commit a9b677c

File tree

2 files changed

+264
-212
lines changed

2 files changed

+264
-212
lines changed

pkg/cluster/connection_pooler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ func (c *Cluster) syncConnectionPooler(oldSpec, newSpec *acidv1.Postgresql, Look
713713
// as per spec, hence do not skip syncing in that case, even though there
714714
// is no diff in specs
715715
if (!needSync && len(masterChanges) <= 0 && len(replicaChanges) <= 0) &&
716-
(c.ConnectionPooler != nil && *newSpec.Spec.EnableConnectionPooler) {
716+
(c.ConnectionPooler != nil && (needConnectionPooler(&newSpec.Spec))) {
717717
c.logger.Debugln("syncing pooler is not required")
718718
return nil, nil
719719
}

0 commit comments

Comments
 (0)