mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
Merge pull request #24716 from arixmkii/improve-machine-inspect-test
Cover Unix socket in inpect test on Windows platform
This commit is contained in:
@@ -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"
|
||||
@@ -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}}")
|
||||
|
||||
Reference in New Issue
Block a user