config: add Dialer field to ConnectionConfig and PoolConfig with option constructors
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user