refactor: Expose HTTPRemoteClient fields to tests through methods

Enables making the fields private later.
This commit is contained in:
Hodlinator
2026-08-17 15:19:49 +02:00
parent 5b06d90831
commit 10bbae302f
2 changed files with 127 additions and 131 deletions

View File

@@ -596,6 +596,16 @@ public:
* @returns false if we are done with this client and HTTPServer can skip the next read operation from it.
*/
bool MaybeSendBytesFromBuffer() EXCLUSIVE_LOCKS_REQUIRED(!m_send_mutex, !m_sock_mutex);
//! Used for tests.
//! @{
const std::string& GetRecvBuffer() const { return m_recv_buffer; }
const HTTPRequest* GetRequest() const { return m_req.get(); }
//! @}
protected:
//! Used for tests.
std::string& MutateRecvBuffer() { return m_recv_buffer; }
};
/** Initialize HTTP server.