Skip to content

Commit

Permalink
test: use tls 1.2 on TLSClientAuth test (elastic#11510)
Browse files Browse the repository at this point in the history
This test is failing on Go 1.21+ because the alert/error message was
fixed is now returning 'certificate required' instead of
'bad certificate'.

See https://go.dev/doc/go1.21#crypto/tls
  • Loading branch information
kruskall authored and bmorelli25 committed Sep 5, 2023
1 parent 90af766 commit 329baa9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion systemtest/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ func TestTLSClientAuth(t *testing.T) {
return nil
}

err := attemptRequest(t, &tls.Config{InsecureSkipVerify: true})
err := attemptRequest(t, &tls.Config{
InsecureSkipVerify: true,
// TODO remove this and update the error message once we bump to go 1.21
MaxVersion: tls.VersionTLS12,
})
require.Error(t, err)
assert.Regexp(t, "tls: bad certificate", err.Error())
logs := srv.Logs.Iterator()
Expand Down

0 comments on commit 329baa9

Please sign in to comment.