Skip to content

Commit

Permalink
libnetwork: fix unhandled errors in tests (ineffassign)
Browse files Browse the repository at this point in the history
    libnetwork/libnetwork_test.go:1014:8: ineffectual assignment to err (ineffassign)
        sbx1, err := controller.NewSandbox(containerID,
              ^
    libnetwork/libnetwork_test.go:1024:8: ineffectual assignment to err (ineffassign)
        sbx2, err := controller.NewSandbox("c2")
              ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Feb 8, 2022
1 parent 99935ff commit 85ed9b8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libnetwork/libnetwork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1014,14 +1014,21 @@ func TestEndpointMultipleJoins(t *testing.T) {
sbx1, err := controller.NewSandbox(containerID,
libnetwork.OptionHostname("test"),
libnetwork.OptionDomainname("docker.io"),
libnetwork.OptionExtraHost("web", "192.168.0.1"))
libnetwork.OptionExtraHost("web", "192.168.0.1"),
)
if err != nil {
t.Fatal(err)
}
defer func() {
if err := sbx1.Delete(); err != nil {
t.Fatal(err)
}
}()

sbx2, err := controller.NewSandbox("c2")
if err != nil {
t.Fatal(err)
}
defer func() {
if err := sbx2.Delete(); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 85ed9b8

Please sign in to comment.