Skip to content

Commit

Permalink
Add unit tests for import populator
Browse files Browse the repository at this point in the history
Signed-off-by: Alvaro Romero <alromero@redhat.com>
  • Loading branch information
alromeros committed Apr 26, 2023
1 parent 10bd149 commit 51b3379
Show file tree
Hide file tree
Showing 3 changed files with 438 additions and 1 deletion.
32 changes: 31 additions & 1 deletion pkg/controller/populators/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "go_default_library",
Expand Down Expand Up @@ -34,3 +34,33 @@ go_library(
"//vendor/sigs.k8s.io/controller-runtime/pkg/source:go_default_library",
],
)

go_test(
name = "go_default_test",
srcs = [
"import-populator_test.go",
"populators_suite_test.go",
],
embed = [":go_default_library"],
deps = [
"//pkg/common:go_default_library",
"//pkg/controller/common:go_default_library",
"//pkg/feature-gates:go_default_library",
"//staging/src/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
"//tests/reporters:go_default_library",
"//vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
"//vendor/k8s.io/client-go/tools/record:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/client/fake:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/log:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/reconcile:go_default_library",
],
)
Loading

0 comments on commit 51b3379

Please sign in to comment.