If the source PVC was created using a dataSource(Ref), then directly copying the PVC spec to the target PVC spec would also copy the dataSource(Ref). If the data source no longer exists the migration would fail because the target PVC would not become bound since the datasource was missing. This change ensures that the dataSource(Ref) is always cleared when creating the target PVC.
Also added a bunch of unit tests to the code that appeared to be missing.
If the source PVC was created using a dataSource(Ref), then directly copying the PVC spec to the target PVC spec would also copy the dataSource(Ref). If the data source no longer exists the migration would fail because the target PVC would not become bound since the datasource was missing. This change ensures that the dataSource(Ref) is always cleared when creating the target PVC.
Also added a bunch of unit tests to the code that appeared to be missing.