Skip to content

Commit

Permalink
Fix network ls --filter invalid value flake
Browse files Browse the repository at this point in the history
The filter is only validated when at least one network exists.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Paul Holzinger committed Dec 7, 2020
1 parent a5ca039 commit 4d6f958
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/e2e/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ var _ = Describe("Podman network", func() {
})

It("podman network list --filter invalid value", func() {
session := podmanTest.Podman([]string{"network", "ls", "--filter", "namr=ab"})
net := "net" + stringid.GenerateNonCryptoID()
session := podmanTest.Podman([]string{"network", "create", net})
session.WaitWithDefaultTimeout()
defer podmanTest.removeCNINetwork(net)
Expect(session.ExitCode()).To(BeZero())

session = podmanTest.Podman([]string{"network", "ls", "--filter", "namr=ab"})
session.WaitWithDefaultTimeout()
Expect(session).To(ExitWithError())
Expect(session.ErrorToString()).To(ContainSubstring(`invalid filter "namr"`))
Expand Down

0 comments on commit 4d6f958

Please sign in to comment.