Insignificant change in ldap_upstream_watcher_test.go

This commit is contained in:
Ryan Richard 2021-05-12 13:37:01 -07:00
parent f0652c1ce1
commit 4804c837d4

View File

@ -137,11 +137,7 @@ func TestLDAPUpstreamWatcherControllerFilterLDAPIdentityProviders(t *testing.T)
// Wrap the func into a struct so the test can do deep equal assertions on instances of upstreamldap.Provider. // Wrap the func into a struct so the test can do deep equal assertions on instances of upstreamldap.Provider.
type comparableDialer struct { type comparableDialer struct {
f upstreamldap.LDAPDialerFunc upstreamldap.LDAPDialerFunc
}
func (d *comparableDialer) Dial(ctx context.Context, hostAndPort string) (upstreamldap.Conn, error) {
return d.f(ctx, hostAndPort)
} }
func TestLDAPUpstreamWatcherControllerSync(t *testing.T) { func TestLDAPUpstreamWatcherControllerSync(t *testing.T) {
@ -689,7 +685,7 @@ func TestLDAPUpstreamWatcherControllerSync(t *testing.T) {
tt.setupMocks(conn) tt.setupMocks(conn)
} }
dialer := &comparableDialer{f: upstreamldap.LDAPDialerFunc(func(ctx context.Context, _ string) (upstreamldap.Conn, error) { dialer := &comparableDialer{upstreamldap.LDAPDialerFunc(func(ctx context.Context, _ string) (upstreamldap.Conn, error) {
if tt.dialError != nil { if tt.dialError != nil {
return nil, tt.dialError return nil, tt.dialError
} }