Skip to content

Commit

Permalink
Merge pull request #24716 from arixmkii/improve-machine-inspect-test
Browse files Browse the repository at this point in the history
Cover Unix socket in inpect test on Windows platform
  • Loading branch information
openshift-merge-bot[bot] authored Dec 3, 2024
2 parents b544338 + 5bbfed2 commit bf1661c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/machine/e2e/inspect_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package e2e_test

import (
"runtime"

"github.com/containers/podman/v5/pkg/machine"
"github.com/containers/podman/v5/pkg/machine/define"
jsoniter "github.com/json-iterator/go"

. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -56,12 +57,10 @@ var _ = Describe("podman inspect stop", func() {
err = jsoniter.Unmarshal(inspectSession.Bytes(), &inspectInfo)
Expect(err).ToNot(HaveOccurred())

switch testProvider.VMType() {
case define.HyperVVirt, define.WSLVirt:
if runtime.GOOS == "windows" {
Expect(inspectInfo[0].ConnectionInfo.PodmanPipe.GetPath()).To(ContainSubstring("podman-"))
default:
Expect(inspectInfo[0].ConnectionInfo.PodmanSocket.GetPath()).To(HaveSuffix("api.sock"))
}
Expect(inspectInfo[0].ConnectionInfo.PodmanSocket.GetPath()).To(HaveSuffix("api.sock"))

inspect := new(inspectMachine)
inspect = inspect.withFormat("{{.Name}}")
Expand Down

0 comments on commit bf1661c

Please sign in to comment.