Merge pull request #107159 from mengjiao-liu/improve-unit-test-coverage-pv

Improve test coverage: pkg/api/persistentvolume
This commit is contained in:
Kubernetes Prow Robot 2022-01-05 00:16:32 -08:00 committed by GitHub
commit 5588d5c578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,13 @@ func TestDropDisabledFields(t *testing.T) {
oldSpec: specWithCSISecrets(nil),
expectOldSpec: specWithCSISecrets(nil),
},
"disabled csi expansion clears secrets when old pv did not had secrets": {
csiExpansionEnabled: false,
newSpec: specWithCSISecrets(secretRef),
expectNewSpec: specWithCSISecrets(nil),
oldSpec: specWithCSISecrets(nil),
expectOldSpec: specWithCSISecrets(nil),
},
}
for name, tc := range tests {