Skip to content

Commit

Permalink
fix tls test
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-r-reis committed Oct 19, 2022
1 parent e71c061 commit 2c97c05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions integration-tests/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ func TestTls_OneWayOrigin_MutualTarget(t *testing.T) {
serverName: "",
errExpected: true,
errWarningsExpected: []string{"tls: first record does not look like a TLS handshake"},
errMsgExpected: "remote error: tls: bad certificate",
errMsgExpected: "",
},
{
name: "Proxy: One-Way TLS on Client, Mutual TLS on Listener, One-way TLS on Origin, mutual TLS on Target",
Expand All @@ -411,7 +411,7 @@ func TestTls_OneWayOrigin_MutualTarget(t *testing.T) {
serverName: "",
errExpected: true,
errWarningsExpected: []string{"tls: client didn't provide a certificate"},
errMsgExpected: "",
errMsgExpected: "remote error: tls: bad certificate",
},
{
name: "Proxy: Mutual TLS and SNI on Client, Mutual TLS on Listener, One-way TLS on Origin, mutual TLS on Target",
Expand Down Expand Up @@ -1066,7 +1066,8 @@ func testProxyClientTls(t *testing.T, ccmSetup *setup.CcmTestSetup,
if proxyTlsConfig.errExpected {
require.NotNil(t, err, "Did not get expected error %s", proxyTlsConfig.errMsgExpected)
if proxyTlsConfig.errMsgExpected != "" {
require.True(t, strings.Contains(err.Error(), proxyTlsConfig.errMsgExpected), err.Error())
require.True(t, strings.Contains(err.Error(), proxyTlsConfig.errMsgExpected),
"%v not found in %v", proxyTlsConfig.errMsgExpected, err.Error())
}
} else {
require.Nil(t, err, "testClient setup failed: %v", err)
Expand Down

0 comments on commit 2c97c05

Please sign in to comment.