(unittest) / try to run the cobra 2 sentry bot test with SSL if the platform supports it
This commit is contained in:
parent
575bceb1ec
commit
5691b55967
@ -78,7 +78,7 @@ namespace
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
TEST_CASE("Cobra_to_sentry_bot", "[foo]")
|
TEST_CASE("Cobra_to_sentry_bot", "[cobra_bots]")
|
||||||
{
|
{
|
||||||
SECTION("Exchange and count sent/received messages.")
|
SECTION("Exchange and count sent/received messages.")
|
||||||
{
|
{
|
||||||
@ -101,6 +101,12 @@ TEST_CASE("Cobra_to_sentry_bot", "[foo]")
|
|||||||
tlsOptionsServer.keyFile = ".certs/trusted-server-key.pem";
|
tlsOptionsServer.keyFile = ".certs/trusted-server-key.pem";
|
||||||
tlsOptionsServer.caFile = ".certs/trusted-ca-crt.pem";
|
tlsOptionsServer.caFile = ".certs/trusted-ca-crt.pem";
|
||||||
|
|
||||||
|
#if defined(IXWEBSOCKET_USE_MBED_TLS) || defined(IXWEBSOCKET_USE_OPEN_SSL)
|
||||||
|
tlsOptionsServer.tls = true;
|
||||||
|
#else
|
||||||
|
tlsOptionsServer.tls = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
int sentryPort = getFreePort();
|
int sentryPort = getFreePort();
|
||||||
ix::HttpServer sentryServer(sentryPort, "127.0.0.1");
|
ix::HttpServer sentryServer(sentryPort, "127.0.0.1");
|
||||||
sentryServer.setTLSOptions(tlsOptionsServer);
|
sentryServer.setTLSOptions(tlsOptionsServer);
|
||||||
@ -163,9 +169,12 @@ TEST_CASE("Cobra_to_sentry_bot", "[foo]")
|
|||||||
// to regress the TLS 1.3 OpenSSL bug
|
// to regress the TLS 1.3 OpenSSL bug
|
||||||
// -> https://github.com/openssl/openssl/issues/7967
|
// -> https://github.com/openssl/openssl/issues/7967
|
||||||
// https://xxxxx:yyyyyy@sentry.io/1234567
|
// https://xxxxx:yyyyyy@sentry.io/1234567
|
||||||
std::stringstream oss;
|
#if defined(IXWEBSOCKET_USE_MBED_TLS) || defined(IXWEBSOCKET_USE_OPEN_SSL)
|
||||||
|
std::string scheme("https://");
|
||||||
|
#else
|
||||||
std::string scheme("http://");
|
std::string scheme("http://");
|
||||||
|
#endif
|
||||||
|
std::stringstream oss;
|
||||||
oss << scheme << "xxxxxxx:yyyyyyy@localhost:" << sentryPort << "/1234567";
|
oss << scheme << "xxxxxxx:yyyyyyy@localhost:" << sentryPort << "/1234567";
|
||||||
std::string dsn = oss.str();
|
std::string dsn = oss.str();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user