mirror of
https://github.com/containers/podman.git
synced 2025-06-20 09:03:43 +08:00
Fix network remove for the podman remote client
The podman remote client ignored the force option due a typo. If an error occured the remote client would panic with an index out of range error. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
@ -294,4 +294,23 @@ var _ = Describe("Podman network", func() {
|
||||
Expect(session.ExitCode()).To(BeZero())
|
||||
Expect(session.OutputToString()).To(Not(ContainSubstring(netName)))
|
||||
})
|
||||
|
||||
It("podman network remove with two networks", func() {
|
||||
netName1 := "net1"
|
||||
session := podmanTest.Podman([]string{"network", "create", netName1})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(BeZero())
|
||||
|
||||
netName2 := "net2"
|
||||
session = podmanTest.Podman([]string{"network", "create", netName2})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(BeZero())
|
||||
|
||||
session = podmanTest.Podman([]string{"network", "rm", netName1, netName2})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(BeZero())
|
||||
lines := session.OutputToStringArray()
|
||||
Expect(lines[0]).To(Equal(netName1))
|
||||
Expect(lines[1]).To(Equal(netName2))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user