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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-01-28 12:28:39 +01:00
parent 99935ff803
commit 85ed9b8746
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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)