From c8320bd7a656c2bdd0fc80ec15b61842767b3e53 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Wed, 17 Jan 2024 11:23:16 +0100 Subject: [PATCH] fix tests --- x-pack/filebeat/input/lumberjack/server_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x-pack/filebeat/input/lumberjack/server_test.go b/x-pack/filebeat/input/lumberjack/server_test.go index 1c2aa2de3e08..c071a71940de 100644 --- a/x-pack/filebeat/input/lumberjack/server_test.go +++ b/x-pack/filebeat/input/lumberjack/server_test.go @@ -52,7 +52,8 @@ func TestServer(t *testing.T) { c := makeTestConfig() c.TLS = serverConf // Disable mTLS requirements in the server. - c.TLS.ClientAuth = 0 // tls.NoClientCert + clientAuth := tlscommon.TLSClientAuthNone + c.TLS.ClientAuth = &clientAuth // tls.NoClientCert c.TLS.VerificationMode = tlscommon.VerifyNone testSendReceive(t, c, 10, clientConf) @@ -219,12 +220,12 @@ func tlsSetup(t *testing.T) (clientConfig *tls.Config, serverConfig *tlscommon.S Certificates: []tls.Certificate{certData.client.TLSCertificate(t)}, MinVersion: tls.VersionTLS12, } - + clientAuth := tlscommon.TLSClientAuthRequired serverConfig = &tlscommon.ServerConfig{ // NOTE: VerifyCertificate is ineffective unless ClientAuth is set to RequireAndVerifyClientCert. VerificationMode: tlscommon.VerifyCertificate, // Unfortunately ServerConfig uses an unexported type in an exported field. - ClientAuth: 4, // tls.RequireAndVerifyClientCert + ClientAuth: &clientAuth, // tls.RequireAndVerifyClientCert CAs: []string{ string(certData.ca.CertPEM(t)), },