Skip to content

Commit

Permalink
functests: Increase the memory resources of a passt VM
Browse files Browse the repository at this point in the history
Signed-off-by: Itamar Holder <iholder@redhat.com>
  • Loading branch information
iholder101 committed May 5, 2024
1 parent fbcd7af commit b8e36ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/network/bindingplugin_passt.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"fmt"
"time"

"k8s.io/apimachinery/pkg/api/resource"

expect "github.com/google/goexpect"

. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -403,6 +405,12 @@ func startPasstVMI(vmiBuilder func(opts ...libvmi.Option) *v1.VirtualMachineInst
libvmi.WithNetwork(v1.DefaultPodNetwork()),
libvmi.WithCloudInitNoCloudNetworkData(networkData),
)

// Add memory overhead needed for paast
memory := vmi.Spec.Domain.Resources.Requests[k8sv1.ResourceMemory]
memory.Add(resource.MustParse("800Mi"))
vmi.Spec.Domain.Resources.Requests[k8sv1.ResourceMemory] = memory

vmi, err = kubevirt.Client().VirtualMachineInstance(testsuite.GetTestNamespace(nil)).Create(context.Background(), vmi, metav1.CreateOptions{})
ExpectWithOffset(1, err).ToNot(HaveOccurred())
vmi = libwait.WaitUntilVMIReady(vmi,
Expand Down

0 comments on commit b8e36ba

Please sign in to comment.