mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-26 19:35:10 +00:00
This increases type safety and makes the code easier to read because it becomes obvious that the "test resource" passed to some functions must be the result of a previous CreateVolume. This makes it possible to remove: - functions that never did anything (the DeleteVolume methods in drivers that never create a volume) - type casts (in the DeleteVolume implementation) - the unused DeleteVolume parameters - the stand-alone DeleteVolume function (which would be just a non-nil check) GetPersistentVolumeSource and GetVolumeSource could also become methods on more specific interfaces - they don't actually use anything from TestDriver instance which provides them. The main motivation however is to reduce the number of methods which might need an explicit test config parameter.