wsl: machine tests for inspect

small corrections for wsl between sockets and pipe

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2023-09-26 07:25:49 -05:00
parent a2434a9d37
commit 217c4d5468

View File

@ -9,7 +9,7 @@ import (
. "github.com/onsi/gomega/gexec" . "github.com/onsi/gomega/gexec"
) )
var _ = Describe("podman machine stop", func() { var _ = Describe("podman inspect stop", func() {
var ( var (
mb *machineTestBuilder mb *machineTestBuilder
testDir string testDir string
@ -65,7 +65,12 @@ var _ = Describe("podman machine stop", func() {
var inspectInfo []machine.InspectInfo var inspectInfo []machine.InspectInfo
err = jsoniter.Unmarshal(inspectSession.Bytes(), &inspectInfo) err = jsoniter.Unmarshal(inspectSession.Bytes(), &inspectInfo)
Expect(err).ToNot(HaveOccurred()) 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 := new(inspectMachine)
inspect = inspect.withFormat("{{.Name}}") inspect = inspect.withFormat("{{.Name}}")