mirror of
https://github.com/containers/podman.git
synced 2026-07-10 07:15:05 -04:00
Merge pull request #28845 from bit-hope/fix-podman-inspect-type-all
fix: handle multiple networks in 'podman inspect --type=all'
This commit is contained in:
@@ -228,7 +228,7 @@ func (i *inspector) inspectAll(ctx context.Context, namesOrIDs []string) ([]any,
|
||||
data = append(data, volumeData[0])
|
||||
continue
|
||||
}
|
||||
networkData, errs, err := registry.ContainerEngine().NetworkInspect(ctx, namesOrIDs, i.options)
|
||||
networkData, errs, err := registry.ContainerEngine().NetworkInspect(ctx, []string{name}, i.options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
@@ -371,6 +371,17 @@ var _ = Describe("Podman inspect", func() {
|
||||
Expect(session.OutputToString()).To(ContainSubstring("bridge"))
|
||||
})
|
||||
|
||||
It("podman inspect networks with --type=all ", func() {
|
||||
name_0, path_0 := generateNetworkConfig(podmanTest)
|
||||
defer removeConf(path_0)
|
||||
name_1, path_1 := generateNetworkConfig(podmanTest)
|
||||
defer removeConf(path_1)
|
||||
|
||||
session := podmanTest.PodmanExitCleanly("inspect", "--type", "all", name_0, name_1, "--format", "{{.Name}}")
|
||||
Expect(session.OutputToString()).To(ContainSubstring(name_0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring(name_1))
|
||||
})
|
||||
|
||||
It("podman inspect a volume", func() {
|
||||
session := podmanTest.Podman([]string{"volume", "create", "myvol"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
||||
Reference in New Issue
Block a user