From ac83cee25cab11da5f3510ca920eb95b83368722 Mon Sep 17 00:00:00 2001 From: Adam Shannon Date: Fri, 10 May 2024 10:26:24 -0500 Subject: [PATCH] database: fix cert paths in test --- database/tls_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/database/tls_test.go b/database/tls_test.go index f761f849..1aefbd21 100644 --- a/database/tls_test.go +++ b/database/tls_test.go @@ -11,14 +11,17 @@ import ( ) func Test_LoadClientCertsFromConfig(t *testing.T) { - err := testcerts.GenerateCertsToFile("/tmp/client_cert.pem", "/tmp/client_cert_private_key.pem") + certFilepath := filepath.Join("/", "tmp", "client_cert.pem") + keyFilepath := filepath.Join("/", "tmp", "client_cert_private_key.pem") + + err := testcerts.GenerateCertsToFile(certFilepath, keyFilepath) require.Nil(t, err) config := &database.MySQLConfig{ TLSClientCerts: []database.TLSClientCertConfig{ { - CertFilePath: filepath.Join("/", "tmp", "client_cert.pem"), - KeyFilePath: filepath.Join("/", "tmp", "client_cert_private_key.pem"), + CertFilePath: certFilepath, + KeyFilePath: keyFilepath, }, }, }