mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2025-01-18 16:01:40 +03:00
more tests
This commit is contained in:
parent
20dc1f1aa8
commit
d047090307
@ -25,6 +25,11 @@ func (t *HTTPClientBuilderTest) Test_SetTimeout() {
|
||||
assert.Equal(t.T(), 90*time.Second, t.builder.httpClient.Timeout)
|
||||
}
|
||||
|
||||
func (t *HTTPClientBuilderTest) Test_EnableLogging() {
|
||||
t.builder.EnableLogging()
|
||||
assert.Equal(t.T(), true, t.builder.logging)
|
||||
}
|
||||
|
||||
func (t *HTTPClientBuilderTest) Test_SetMockAddress() {
|
||||
addr := "mock.local:3004"
|
||||
t.builder.SetMockAddress(addr)
|
||||
@ -56,6 +61,13 @@ func (t *HTTPClientBuilderTest) Test_SetSSLVerification() {
|
||||
assert.True(t.T(), t.builder.httpTransport.TLSClientConfig.InsecureSkipVerify)
|
||||
}
|
||||
|
||||
func (t *HTTPClientBuilderTest) Test_FromConfigNil() {
|
||||
defer func() {
|
||||
assert.Nil(t.T(), recover())
|
||||
}()
|
||||
t.builder.FromConfig(nil)
|
||||
}
|
||||
|
||||
func (t *HTTPClientBuilderTest) Test_FromConfig() {
|
||||
config := &HTTPClientConfig{
|
||||
SSLVerification: boolPtr(true),
|
||||
|
Loading…
x
Reference in New Issue
Block a user