mirror of https://github.com/containers/podman.git
Merge pull request #19478 from dcermak/show-socket-exists
Always show RemoteSocket.Exists in json
This commit is contained in:
commit
eceae9da57
|
@ -269,7 +269,7 @@ remove_packaged_podman_files() {
|
||||||
req_env_vars OS_RELEASE_ID
|
req_env_vars OS_RELEASE_ID
|
||||||
|
|
||||||
# If any binaries are resident they could cause unexpected pollution
|
# If any binaries are resident they could cause unexpected pollution
|
||||||
for unit in io.podman.service io.podman.socket
|
for unit in podman.socket podman-auto-update.timer
|
||||||
do
|
do
|
||||||
for state in enabled active
|
for state in enabled active
|
||||||
do
|
do
|
||||||
|
@ -291,6 +291,9 @@ remove_packaged_podman_files() {
|
||||||
LISTING_CMD="rpm -ql podman"
|
LISTING_CMD="rpm -ql podman"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# delete the podman socket in case it has been created previously
|
||||||
|
rm -f $(podman info --format "{{.Host.RemoteSocket.Path}}")
|
||||||
|
|
||||||
# yum/dnf/dpkg may list system directories, only remove files
|
# yum/dnf/dpkg may list system directories, only remove files
|
||||||
$LISTING_CMD | while read fullpath
|
$LISTING_CMD | while read fullpath
|
||||||
do
|
do
|
||||||
|
|
|
@ -68,7 +68,7 @@ type HostInfo struct {
|
||||||
// RemoteSocket describes information about the API socket
|
// RemoteSocket describes information about the API socket
|
||||||
type RemoteSocket struct {
|
type RemoteSocket struct {
|
||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
Exists bool `json:"exists,omitempty"`
|
Exists bool `json:"exists"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SlirpInfo describes the slirp executable that is being used
|
// SlirpInfo describes the slirp executable that is being used
|
||||||
|
|
|
@ -118,6 +118,8 @@ var _ = Describe("Podman Info", func() {
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
if IsRemote() {
|
if IsRemote() {
|
||||||
Expect(session.OutputToString()).To(ContainSubstring("true"))
|
Expect(session.OutputToString()).To(ContainSubstring("true"))
|
||||||
|
} else {
|
||||||
|
Expect(session.OutputToString()).To(ContainSubstring("false"))
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue