|
|
@ -741,22 +741,21 @@ func TestConfigurator_OutgoingRPCTLSDisabled(t *testing.T) {
|
|
|
|
expected bool
|
|
|
|
expected bool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
variants := []variant{
|
|
|
|
variants := []variant{
|
|
|
|
{false, false, nil, true},
|
|
|
|
{false, false, nil, false},
|
|
|
|
{true, false, nil, false},
|
|
|
|
{true, false, nil, true},
|
|
|
|
{false, true, nil, false},
|
|
|
|
{false, true, nil, true},
|
|
|
|
{true, true, nil, false},
|
|
|
|
{true, true, nil, true},
|
|
|
|
|
|
|
|
|
|
|
|
// {false, false, &x509.CertPool{}, false},
|
|
|
|
{true, false, &x509.CertPool{}, true},
|
|
|
|
{true, false, &x509.CertPool{}, false},
|
|
|
|
{false, true, &x509.CertPool{}, true},
|
|
|
|
{false, true, &x509.CertPool{}, false},
|
|
|
|
{true, true, &x509.CertPool{}, true},
|
|
|
|
{true, true, &x509.CertPool{}, false},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for i, v := range variants {
|
|
|
|
for i, v := range variants {
|
|
|
|
info := fmt.Sprintf("case %d", i)
|
|
|
|
info := fmt.Sprintf("case %d", i)
|
|
|
|
c.caPool = v.pool
|
|
|
|
c.caPool = v.pool
|
|
|
|
c.base.VerifyOutgoing = v.verify
|
|
|
|
c.base.VerifyOutgoing = v.verify
|
|
|
|
c.base.AutoTLS = v.autoEncryptTLS
|
|
|
|
c.base.AutoTLS = v.autoEncryptTLS
|
|
|
|
require.Equal(t, v.expected, c.outgoingRPCTLSDisabled(), info)
|
|
|
|
require.Equal(t, v.expected, c.outgoingRPCTLSEnabled(), info)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|