Use fake client for connection pooler (#1301)

Connection pooler creation, deletion, and synchronization now tested using fake client API.

Co-authored-by: Rafia Sabih <rafia.sabih@zalando.de>
This commit is contained in:
Rafia Sabih
2021-01-19 17:40:20 +01:00
committed by GitHub
co-authored by Rafia Sabih
parent 2b45478f3a
commit a9b677c957
2 changed files with 297 additions and 245 deletions
+1 -1
View File
@@ -713,7 +713,7 @@ func (c *Cluster) syncConnectionPooler(oldSpec, newSpec *acidv1.Postgresql, Look
// as per spec, hence do not skip syncing in that case, even though there
// is no diff in specs
if (!needSync && len(masterChanges) <= 0 && len(replicaChanges) <= 0) &&
(c.ConnectionPooler != nil && *newSpec.Spec.EnableConnectionPooler) {
(c.ConnectionPooler != nil && (needConnectionPooler(&newSpec.Spec))) {
c.logger.Debugln("syncing pooler is not required")
return nil, nil
}