From a38a5aa5744c0ce766d850892e3e602cb62cb786 Mon Sep 17 00:00:00 2001 From: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Thu, 5 Mar 2020 10:12:10 +0100 Subject: [PATCH] Add test for sync with flag --- pkg/cluster/sync_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/cluster/sync_test.go b/pkg/cluster/sync_test.go index 8087a7db4..33bd01d16 100644 --- a/pkg/cluster/sync_test.go +++ b/pkg/cluster/sync_test.go @@ -115,6 +115,19 @@ func TestConnPoolSynchronization(t *testing.T) { cluster: &clusterMissingObjects, check: objectsAreSaved, }, + { + subTest: "create if doesn't exist with a flag", + oldSpec: &acidv1.Postgresql{ + Spec: acidv1.PostgresSpec{}, + }, + newSpec: &acidv1.Postgresql{ + Spec: acidv1.PostgresSpec{ + EnableConnectionPool: boolToPointer(true), + }, + }, + cluster: &clusterMissingObjects, + check: objectsAreSaved, + }, { subTest: "create from scratch", oldSpec: &acidv1.Postgresql{