config: add Dialer field to ConnectionConfig and PoolConfig with option constructors

This commit is contained in:
Jay
2026-05-26 14:17:58 -04:00
parent fac62c0675
commit 695389798e
4 changed files with 34 additions and 0 deletions
+8
View File
@@ -1,6 +1,7 @@
package honeybee
import (
"git.wisehodl.dev/jay/go-honeybee/honeybeetest"
"git.wisehodl.dev/jay/go-honeybee/transport"
"github.com/stretchr/testify/assert"
"testing"
@@ -138,3 +139,10 @@ func TestValidatePoolConfig(t *testing.T) {
})
}
}
func TestWithPoolDialer(t *testing.T) {
mock := &honeybeetest.MockDialer{}
conf, err := NewPoolConfig(WithPoolDialer(mock))
assert.NoError(t, err)
assert.Equal(t, mock, conf.Dialer)
}