test: check and handle error for testing

This commit is contained in:
2026-01-26 18:55:59 +07:00
parent 6def82a095
commit a3f6baa6ae
17 changed files with 505 additions and 516 deletions
+3 -1
View File
@@ -744,7 +744,9 @@ func TestNew(t *testing.T) {
if cli == nil {
t.Fatal("New() returned nil client")
}
defer cli.Close()
defer func(cli Client) {
_ = cli.Close()
}(cli)
}
type MockConfig struct {