Merge pull request #125402 from iholder101/swap/skip-e2e-test-if-no-swap

[KEP-2400]: Swap e2e tests: skip swap stress tests if swap is not provisioned
This commit is contained in:
Kubernetes Prow Robot 2024-06-25 14:17:58 -07:00 committed by GitHub
commit 0913b90809
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -153,7 +153,9 @@ var _ = SIGDescribe("Swap", "[LinuxOnly]", nodefeature.Swap, func() {
gomega.Expect(nodeUsedMemory.IsZero()).To(gomega.BeFalseBecause("node used memory is zero"))
swapCapacity = getSwapCapacity(f, sleepingPod)
gomega.Expect(swapCapacity.IsZero()).To(gomega.BeFalseBecause("node swap capacity is zero"))
if swapCapacity.IsZero() {
e2eskipper.Skipf("swap is not provisioned on the node")
}
err := podClient.Delete(context.Background(), sleepingPod.Name, metav1.DeleteOptions{})
framework.ExpectNoError(err)