Skip to content

Commit

Permalink
database: fix cert paths in test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed May 10, 2024
1 parent a8638e5 commit ac83cee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions database/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
}
Expand Down

0 comments on commit ac83cee

Please sign in to comment.