fix(eventsub): check keepalive (#6058)

This commit is contained in:
nerix
2025-03-09 21:32:49 +01:00
committed by GitHub
parent 673ce8eecf
commit 9124c68278
8 changed files with 224 additions and 148 deletions
+8 -3
View File
@@ -304,6 +304,13 @@ TEST_P(TestEventSubMessagesP, Run)
input = snapshot->input().toArray();
}
std::unique_ptr<eventsub::lib::Listener> listener =
std::make_unique<eventsub::Connection>();
boost::asio::io_context ioc;
boost::asio::ssl::context ssl(
boost::asio::ssl::context::method::tls_client);
eventsub::lib::Session sess(ioc, ssl, std::move(listener));
for (const auto inputRef : input)
{
auto inputObj = inputRef.toObject();
@@ -321,9 +328,7 @@ TEST_P(TestEventSubMessagesP, Run)
auto json = makePayload(eventSubscription->second, inputObj);
std::unique_ptr<eventsub::lib::Listener> listener =
std::make_unique<eventsub::Connection>();
auto ec = eventsub::lib::handleMessage(listener, json);
auto ec = sess.handleMessage(json);
ASSERT_FALSE(ec.failed())
<< ec.what() << ec.message() << ec.location().to_string();
}