@ -478,7 +478,7 @@ func TestLeader_PeeringSync_FailsForTLSError(t *testing.T) {
t . Run ( "server-name-validation" , func ( t * testing . T ) {
t . Run ( "server-name-validation" , func ( t * testing . T ) {
testLeader_PeeringSync_failsForTLSError ( t , func ( token * structs . PeeringToken ) {
testLeader_PeeringSync_failsForTLSError ( t , func ( token * structs . PeeringToken ) {
token . ServerName = "wrong.name"
token . ServerName = "wrong.name"
} , ` transport: authentication handshake failed: x509: certificate is valid for server.dc1.peering.11111111-2222-3333-4444-555555555555.consul, not wrong.name` )
} , ` transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate is valid for server.dc1.peering.11111111-2222-3333-4444-555555555555.consul, not wrong.name` )
} )
} )
t . Run ( "bad-ca-roots" , func ( t * testing . T ) {
t . Run ( "bad-ca-roots" , func ( t * testing . T ) {
wrongRoot , err := os . ReadFile ( "../../test/client_certs/rootca.crt" )
wrongRoot , err := os . ReadFile ( "../../test/client_certs/rootca.crt" )
@ -486,7 +486,7 @@ func TestLeader_PeeringSync_FailsForTLSError(t *testing.T) {
testLeader_PeeringSync_failsForTLSError ( t , func ( token * structs . PeeringToken ) {
testLeader_PeeringSync_failsForTLSError ( t , func ( token * structs . PeeringToken ) {
token . CA = [ ] string { string ( wrongRoot ) }
token . CA = [ ] string { string ( wrongRoot ) }
} , ` transport: authentication handshake failed: x509: certificate signed by unknown authority` )
} , ` transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority` )
} )
} )
}
}