mirror of
https://github.com/kubevirt/containerized-data-importer.git
synced 2025-06-03 06:30:22 +00:00

* Create CRD for volumeuploadsource populator This CRD will be used in the DataSourceRef on PVCs to trigger population that upload to the volume. This will be performed by the upload populator that will be added in future commits. Signed-off-by: Shelly Kagan <skagan@redhat.com> * Create upload populator controller The upload populator controller can be used standalone without the need of datavolume. It reconciles pvc with upload dataSourceRef and uses populators API to populated the pvc with an upload command. The controller creates pvc' with upload annotation. After the upload completes it rebinds the pv to the original target pvc and deletes pvc prime. Eventually we get a bound PVC which is already populated. Signed-off-by: Shelly Kagan <skagan@redhat.com> * Adjust upload-proxy to handle upload population In case of pvc with datasourceref to upload population we should create the url to the upload server with the pvc' name. Signed-off-by: Shelly Kagan <skagan@redhat.com> * Add tests for upload population Signed-off-by: Shelly Kagan <skagan@redhat.com> * Add unit tests for upload populator Signed-off-by: Shelly Kagan <skagan@redhat.com> * Add preallocation to volumeuploadsource crd Also some other small fixes Signed-off-by: Shelly Kagan <skagan@redhat.com> --------- Signed-off-by: Shelly Kagan <skagan@redhat.com>
23 lines
514 B
Go
23 lines
514 B
Go
package populators
|
|
|
|
import (
|
|
. "github.com/onsi/ginkgo"
|
|
. "github.com/onsi/gomega"
|
|
|
|
"testing"
|
|
|
|
logf "sigs.k8s.io/controller-runtime/pkg/log"
|
|
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
|
|
|
"kubevirt.io/containerized-data-importer/tests/reporters"
|
|
)
|
|
|
|
func TestPopulators(t *testing.T) {
|
|
RegisterFailHandler(Fail)
|
|
RunSpecsWithDefaultAndCustomReporters(t, "Populators Suite", reporters.NewReporters())
|
|
}
|
|
|
|
var _ = BeforeSuite(func() {
|
|
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)))
|
|
})
|