Skip to content

Commit

Permalink
stop calling NewRandomVMIWithEphemeralDisk (continue)
Browse files Browse the repository at this point in the history
NewRandomVMIWithEphemeralDisk is deprecated. This PR removes calls to
this function from the tests/vmi_kernel_boot_test.go file, and
replceing it with libvmi factories.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
  • Loading branch information
nunnatsa committed May 5, 2024
1 parent 3b1c1e1 commit 6d56e28
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/vmi_kernel_boot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import (

"kubevirt.io/kubevirt/tests/decorators"

k8sv1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -38,7 +35,6 @@ import (

"kubevirt.io/kubevirt/pkg/libvmi"

cd "kubevirt.io/kubevirt/tests/containerdisk"
"kubevirt.io/kubevirt/tests/framework/kubevirt"
"kubevirt.io/kubevirt/tests/libpod"
"kubevirt.io/kubevirt/tests/libvmifact"
Expand All @@ -48,7 +44,6 @@ import (

"kubevirt.io/client-go/kubecli"

"kubevirt.io/kubevirt/tests"
"kubevirt.io/kubevirt/tools/vms-generator/utils"
)

Expand All @@ -71,8 +66,7 @@ var _ = Describe("[sig-compute]VMI with external kernel boot", decorators.SigCom

It("ensure successful boot and deletion when VMI has a disk defined", func() {
By("Creating VMI with disk and kernel boot")
vmi := tests.NewRandomVMIWithEphemeralDisk(cd.ContainerDiskFor(cd.ContainerDiskAlpine))
vmi.Spec.Domain.Resources.Requests[k8sv1.ResourceMemory] = resource.MustParse("1Gi")
vmi := libvmifact.NewAlpine()
utils.AddKernelBootToVMI(vmi)

Expect(vmi.Spec.Volumes).ToNot(BeEmpty())
Expand Down

0 comments on commit 6d56e28

Please sign in to comment.