test(addons): discard the close error of the held listener

errcheck flags the deferred Close of the listener that keeps the port
busy. The test has no use for that error, so the defer drops it
explicitly.

Assisted-by: Claude Code:claude-sonnet-5-5 go
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto committed 2026-10-21 01:55:12 +00:00
1 parent 4899713ed7
commit 579ed93daf
1 file changed
+1 -1
@@ -57,7 +57,7 @@ func TestLoopbackPortInUseFailsClearly(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer held.Close()
defer func() { _ = held.Close() }()
_, _, err = NewLoopbackCarrierConfig("local", root)
if err == nil {
t.Fatal("expected an error while the port is in use")