Skip to content

Commit

Permalink
Fix WSL machine test regressions
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
baude committed Dec 11, 2023
1 parent d513749 commit 36e29a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
DEBIAN_NAME: "debian-13"

# Image identifiers
IMAGE_SUFFIX: "c20231206t225809z-f39f38d13"
IMAGE_SUFFIX: "c20231208t193858z-f39f38d13"


# EC2 images
Expand Down
2 changes: 1 addition & 1 deletion pkg/machine/e2e/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/machine/e2e/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand Down

0 comments on commit 36e29a8

Please sign in to comment.