fix(store): close pool on failed Ping; add ListEndpoints test

This commit is contained in:
2026-07-01 16:55:24 +07:00
parent 420358b558
commit 0cf9de38c4
2 changed files with 21 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ func New(ctx context.Context, dsn string) (*Store, error) {
return nil, err
}
if err := pool.Ping(ctx); err != nil {
pool.Close()
return nil, err
}
return &Store{Pool: pool}, nil