From 43726e8403ba19d092c84c4418bc895773c19fa2 Mon Sep 17 00:00:00 2001 From: TommyStarK Date: Mon, 21 Nov 2022 17:18:24 +0100 Subject: [PATCH] pkg/api/persistentvolume: Improving test coverage. Signed-off-by: TommyStarK --- pkg/api/persistentvolume/util_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/api/persistentvolume/util_test.go b/pkg/api/persistentvolume/util_test.go index 1838c054c38..1780a944356 100644 --- a/pkg/api/persistentvolume/util_test.go +++ b/pkg/api/persistentvolume/util_test.go @@ -78,6 +78,13 @@ func TestDropDisabledFields(t *testing.T) { oldSpec: specWithCSISecrets(nil), expectOldSpec: specWithCSISecrets(nil), }, + "disabled csi expansion neither new pv nor old pv had secrets": { + csiExpansionEnabled: false, + newSpec: specWithCSISecrets(nil), + expectNewSpec: specWithCSISecrets(nil), + oldSpec: specWithCSISecrets(nil), + expectOldSpec: specWithCSISecrets(nil), + }, } for name, tc := range tests {