mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 14:44:02 +03:00
Use native dialer to communicate with fronting domain
This commit is contained in:
@@ -2,6 +2,7 @@ package testlib
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
"github.com/9seconds/mtg/v2/essentials"
|
||||
@@ -24,6 +25,10 @@ func (m *MtglibNetworkMock) DialContext(ctx context.Context, network, address st
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) //nolint: wrapcheck, forcetypeassert
|
||||
}
|
||||
|
||||
func (m *MtglibNetworkMock) NativeDialer() *net.Dialer {
|
||||
return m.Called().Get(0).(*net.Dialer)
|
||||
}
|
||||
|
||||
func (m *MtglibNetworkMock) MakeHTTPClient(dialFunc func(ctx context.Context,
|
||||
network, address string) (essentials.Conn, error),
|
||||
) *http.Client {
|
||||
|
||||
Reference in New Issue
Block a user