Skip to content

Commit

Permalink
Add AlpineVolumeSize under ContainerDisk const
Browse files Browse the repository at this point in the history
Signed-off-by: Roni Kishner <rkishner@redhat.com>
  • Loading branch information
RoniKishner committed May 5, 2024
1 parent f24ad8c commit 90b00f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/containerdisk/containerdisk.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const (
const (
FedoraVolumeSize = "6Gi"
CirrosVolumeSize = "512Mi"
AlpineVolumeSize = "512Mi"
BlankVolumeSize = "16Mi"
)

Expand Down
6 changes: 5 additions & 1 deletion tests/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ var _ = Describe("[rfe_id:1177][crit:medium][vendor:cnv-qe@redhat.com][level:com
type vmiBuilder func() (*v1.VirtualMachineInstance, *cdiv1.DataVolume)

newVirtualMachineInstanceWithFileDisk := func() (*v1.VirtualMachineInstance, *cdiv1.DataVolume) {
Expect(libstorage.HasCDI()).To(BeTrue(), "Skip DataVolume tests when CDI is not present")
sc, foundSC := libstorage.GetRWOFileSystemStorageClass()
Expect(foundSC).To(BeTrue(), "Filesystem storage is not present")

Expand All @@ -178,7 +179,7 @@ var _ = Describe("[rfe_id:1177][crit:medium][vendor:cnv-qe@redhat.com][level:com
libdv.WithRegistryURLSourceAndPullMethod(imageUrl, cdiv1.RegistryPullNode),
libdv.WithPVC(
libdv.PVCWithStorageClass(sc),
libdv.PVCWithVolumeSize(cd.CirrosVolumeSize),
libdv.PVCWithVolumeSize(cd.AlpineVolumeSize),
libdv.PVCWithAccessMode(k8sv1.ReadWriteOnce),
libdv.PVCWithVolumeMode(k8sv1.PersistentVolumeFilesystem),
),
Expand All @@ -187,8 +188,11 @@ var _ = Describe("[rfe_id:1177][crit:medium][vendor:cnv-qe@redhat.com][level:com
Expect(err).ToNot(HaveOccurred())

vmi := libvmi.New(
libvmi.WithInterface(libvmi.InterfaceDeviceWithMasqueradeBinding()),
libvmi.WithNetwork(v1.DefaultPodNetwork()),
libvmi.WithDataVolume("disk0", dataVolume.Name),
libvmi.WithResourceMemory("1Gi"),
libvmi.WithNamespace(testsuite.GetTestNamespace(nil)),
libvmi.WithCloudInitNoCloudEncodedUserData("#!/bin/bash\necho hello\n"),
)
return vmi, dataVolume
Expand Down

0 comments on commit 90b00f4

Please sign in to comment.