From 217c4d5468849dca768fc5fbe0d7f9305bf4d08b Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Tue, 26 Sep 2023 07:25:49 -0500 Subject: [PATCH] wsl: machine tests for inspect small corrections for wsl between sockets and pipe Signed-off-by: Brent Baude --- pkg/machine/e2e/inspect_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/machine/e2e/inspect_test.go b/pkg/machine/e2e/inspect_test.go index 308ec8e609..9645b42efb 100644 --- a/pkg/machine/e2e/inspect_test.go +++ b/pkg/machine/e2e/inspect_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/gomega/gexec" ) -var _ = Describe("podman machine stop", func() { +var _ = Describe("podman inspect stop", func() { var ( mb *machineTestBuilder testDir string @@ -65,7 +65,12 @@ var _ = Describe("podman machine stop", func() { var inspectInfo []machine.InspectInfo err = jsoniter.Unmarshal(inspectSession.Bytes(), &inspectInfo) Expect(err).ToNot(HaveOccurred()) - Expect(inspectInfo[0].ConnectionInfo.PodmanSocket.GetPath()).To(HaveSuffix("podman.sock")) + switch testProvider.VMType() { + case machine.WSLVirt: + Expect(inspectInfo[0].ConnectionInfo.PodmanPipe.GetPath()).To(ContainSubstring("podman-")) + default: + Expect(inspectInfo[0].ConnectionInfo.PodmanSocket.GetPath()).To(HaveSuffix("podman.sock")) + } inspect := new(inspectMachine) inspect = inspect.withFormat("{{.Name}}")