tests/storage/snapshot: use libvmi.NewCirros
The code is a bit simpler this way.
@@ -34,6 +34,7 @@ import (
cd "kubevirt.io/kubevirt/tests/containerdisk"
"kubevirt.io/kubevirt/tests/libdv"
"kubevirt.io/kubevirt/tests/libstorage"
+ "kubevirt.io/kubevirt/tests/libvmi"
"kubevirt.io/kubevirt/tests/util"
)
@@ -223,9 +224,7 @@ var _ = SIGDescribe("VirtualMachineSnapshot Tests", func() {
Context("With simple VM", func() {
BeforeEach(func() {
var err error
- vmiImage := cd.ContainerDiskFor(cd.ContainerDiskCirros)
- vmi := tests.NewRandomVMIWithEphemeralDiskAndUserdata(vmiImage, "#!/bin/bash\necho 'hello'\n")
- vm = tests.NewRandomVirtualMachine(vmi, false)
+ vm = tests.NewRandomVirtualMachine(libvmi.NewCirros(), false)
vm, err = virtClient.VirtualMachine(util.NamespaceTestDefault).Create(vm)
Expect(err).ToNot(HaveOccurred())
})
