1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00

Do not use certs in container for testing.

The certs are available in test/certificate so it makes more sense to use them there. In addition the container does not need to be rebuilt unless the CA cert changes.
This commit is contained in:
David Steele 2021-08-25 07:33:31 -04:00
parent 7b4d69211e
commit 5d857e196a

View File

@ -44,9 +44,6 @@ typedef enum
Constants
***********************************************************************************************************************************/
#define HRN_SERVER_HOST "tls.test.pgbackrest.org"
#define HRN_SERVER_FAKE_CERT_PATH "/etc/fake-cert"
#define HRN_SERVER_FAKE_KEY_FILE HRN_SERVER_FAKE_CERT_PATH "/pgbackrest-test.key"
#define HRN_SERVER_FAKE_CERT_FILE HRN_SERVER_FAKE_CERT_PATH "/pgbackrest-test.crt"
/***********************************************************************************************************************************
Send commands to the server
@ -240,18 +237,8 @@ void hrnServerRun(IoRead *read, HrnServerProtocol protocol, HrnServerRunParam pa
// If certificate and key are not set then use defaults
if (param.certificate == NULL)
{
// If running in a container use the installed certificate
if (testContainer())
{
param.certificate = strNewZ(HRN_SERVER_FAKE_CERT_FILE);
param.key = strNewZ(HRN_SERVER_FAKE_KEY_FILE);
}
// Else use a certificate from the test path -- tests will need to disable verify
else
{
param.certificate = strNewFmt("%s/" HRN_SERVER_CERT_PREFIX ".crt", hrnPathRepo());
param.key = strNewFmt("%s/" HRN_SERVER_CERT_PREFIX ".key", hrnPathRepo());
}
param.certificate = strNewFmt("%s/" HRN_SERVER_CERT_PREFIX ".crt", hrnPathRepo());
param.key = strNewFmt("%s/" HRN_SERVER_CERT_PREFIX ".key", hrnPathRepo());
}
// Initialize TLS