From 85ed9b8746551b10e8d0b6d7f454b684ba9be6b2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 28 Jan 2022 12:28:39 +0100 Subject: [PATCH] libnetwork: fix unhandled errors in tests (ineffassign) 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 --- libnetwork/libnetwork_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libnetwork/libnetwork_test.go b/libnetwork/libnetwork_test.go index e64f957d74..5472547246 100644 --- a/libnetwork/libnetwork_test.go +++ b/libnetwork/libnetwork_test.go @@ -1014,7 +1014,11 @@ 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) @@ -1022,6 +1026,9 @@ func TestEndpointMultipleJoins(t *testing.T) { }() sbx2, err := controller.NewSandbox("c2") + if err != nil { + t.Fatal(err) + } defer func() { if err := sbx2.Delete(); err != nil { t.Fatal(err)