DetectVolumeSnapshotExist connects to the discovery API and find out if the VolumeSnapshot CRD exist in the cluster
(client discovery.DiscoveryInterface)
| 155 | // DetectVolumeSnapshotExist connects to the discovery API and find out if |
| 156 | // the VolumeSnapshot CRD exist in the cluster |
| 157 | func DetectVolumeSnapshotExist(client discovery.DiscoveryInterface) (err error) { |
| 158 | haveVolumeSnapshot, err = resourceExist(client, "snapshot.storage.k8s.io/v1", "volumesnapshots") |
| 159 | if err != nil { |
| 160 | return err |
| 161 | } |
| 162 | |
| 163 | return nil |
| 164 | } |
| 165 | |
| 166 | // SetVolumeSnapshot set the haveVolumeSnapshot variable to a specific value for testing purposes |
| 167 | // IMPORTANT: use it only in the unit tests |
no test coverage detected