Move current test under its own NodeConformance context

Signed-off-by: Itamar Holder <iholder@redhat.com>
This commit is contained in:
Itamar Holder 2024-02-28 10:39:29 +02:00
parent 9f344f23fb
commit eb5d647655

View File

@ -19,6 +19,7 @@ package e2enode
import ( import (
"context" "context"
"fmt" "fmt"
"k8s.io/kubernetes/test/e2e/nodefeature"
"path/filepath" "path/filepath"
"strconv" "strconv"
@ -44,10 +45,11 @@ const (
cgroupV1MemLimitFile = "/memory/memory.limit_in_bytes" cgroupV1MemLimitFile = "/memory/memory.limit_in_bytes"
) )
var _ = SIGDescribe("Swap", framework.WithNodeConformance(), "[LinuxOnly]", func() { var _ = SIGDescribe("Swap", "[LinuxOnly]", nodefeature.Swap, func() {
f := framework.NewDefaultFramework("swap-test") f := framework.NewDefaultFramework("swap-qos")
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
f.Context(framework.WithNodeConformance(), func() {
ginkgo.DescribeTable("with configuration", func(qosClass v1.PodQOSClass, memoryRequestEqualLimit bool) { ginkgo.DescribeTable("with configuration", func(qosClass v1.PodQOSClass, memoryRequestEqualLimit bool) {
ginkgo.By(fmt.Sprintf("Creating a pod of QOS class %s. memoryRequestEqualLimit: %t", qosClass, memoryRequestEqualLimit)) ginkgo.By(fmt.Sprintf("Creating a pod of QOS class %s. memoryRequestEqualLimit: %t", qosClass, memoryRequestEqualLimit))
pod := getSwapTestPod(f, qosClass, memoryRequestEqualLimit) pod := getSwapTestPod(f, qosClass, memoryRequestEqualLimit)
@ -78,6 +80,7 @@ var _ = SIGDescribe("Swap", framework.WithNodeConformance(), "[LinuxOnly]", func
ginkgo.Entry("QOS Burstable with memory request equals to limit", v1.PodQOSBurstable, true), ginkgo.Entry("QOS Burstable with memory request equals to limit", v1.PodQOSBurstable, true),
ginkgo.Entry("QOS Guaranteed", v1.PodQOSGuaranteed, false), ginkgo.Entry("QOS Guaranteed", v1.PodQOSGuaranteed, false),
) )
})
}) })
// Note that memoryRequestEqualLimit is effective only when qosClass is PodQOSBestEffort. // Note that memoryRequestEqualLimit is effective only when qosClass is PodQOSBestEffort.