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 da9411c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/network/bindingplugin_passt.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package network
import (
"context"
"fmt"
"k8s.io/apimachinery/pkg/api/resource"
"time"

expect "github.com/google/goexpect"
Expand Down Expand Up @@ -403,6 +404,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 da9411c

Please sign in to comment.