From 36e29a843205e05acedd65b559757a49ffbdd19a Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Fri, 8 Dec 2023 14:41:39 -0600 Subject: [PATCH] Fix WSL machine test regressions WSL is unable to set or change CPU/memory settings. We should not test for them. Skip one test and filed issue #20978 Signed-off-by: Brent Baude --- .cirrus.yml | 2 +- pkg/machine/e2e/init_test.go | 2 +- pkg/machine/e2e/list_test.go | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1c1691caa1..01668632f7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -33,7 +33,7 @@ env: DEBIAN_NAME: "debian-13" # Image identifiers - IMAGE_SUFFIX: "c20231206t225809z-f39f38d13" + IMAGE_SUFFIX: "c20231208t193858z-f39f38d13" # EC2 images diff --git a/pkg/machine/e2e/init_test.go b/pkg/machine/e2e/init_test.go index 7c16081578..db717e3a84 100644 --- a/pkg/machine/e2e/init_test.go +++ b/pkg/machine/e2e/init_test.go @@ -79,7 +79,7 @@ var _ = Describe("podman machine init", func() { testMachine := inspectBefore[0] Expect(testMachine.Name).To(Equal(mb.names[0])) - if testProvider.VMType() == machine.WSLVirt { // WSL hardware specs are hardcoded + if testProvider.VMType() != machine.WSLVirt { // WSL hardware specs are hardcoded Expect(testMachine.Resources.CPUs).To(Equal(uint64(cpus))) Expect(testMachine.Resources.Memory).To(Equal(uint64(2048))) } diff --git a/pkg/machine/e2e/list_test.go b/pkg/machine/e2e/list_test.go index 22592578f3..4cdef055e9 100644 --- a/pkg/machine/e2e/list_test.go +++ b/pkg/machine/e2e/list_test.go @@ -80,6 +80,7 @@ var _ = Describe("podman machine list", func() { }) It("list machine: check if running while starting", func() { + skipIfWSL("the below logic does not work on WSL. #20978") i := new(initMachine) session, err := mb.setCmd(i.withImagePath(mb.imagePath)).run() Expect(err).ToNot(HaveOccurred()) @@ -91,6 +92,8 @@ var _ = Describe("podman machine list", func() { Expect(listSession).To(Exit(0)) Expect(listSession.outputToString()).To(Equal("Never")) + // The logic in this test stanza is seemingly invalid on WSL. + // issue #20978 reflects this change s := new(startMachine) startSession, err := mb.setCmd(s).runWithoutWait() Expect(err).ToNot(HaveOccurred())