mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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:
parent
99935ff803
commit
85ed9b8746
1 changed files with 8 additions and 1 deletions
|
@ -1014,7 +1014,11 @@ func TestEndpointMultipleJoins(t *testing.T) {
|
||||||
sbx1, err := controller.NewSandbox(containerID,
|
sbx1, err := controller.NewSandbox(containerID,
|
||||||
libnetwork.OptionHostname("test"),
|
libnetwork.OptionHostname("test"),
|
||||||
libnetwork.OptionDomainname("docker.io"),
|
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() {
|
defer func() {
|
||||||
if err := sbx1.Delete(); err != nil {
|
if err := sbx1.Delete(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -1022,6 +1026,9 @@ func TestEndpointMultipleJoins(t *testing.T) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
sbx2, err := controller.NewSandbox("c2")
|
sbx2, err := controller.NewSandbox("c2")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := sbx2.Delete(); err != nil {
|
if err := sbx2.Delete(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|
Loading…
Reference in a new issue