From 702d32b41c1c4f496dba046c2017cb5b907e55cd Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 12 Jan 2023 20:00:40 +0100 Subject: FCGI test --- tests/helper.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tests/helper.h (limited to 'tests/helper.h') diff --git a/tests/helper.h b/tests/helper.h new file mode 100644 index 0000000..eba74cd --- /dev/null +++ b/tests/helper.h @@ -0,0 +1,56 @@ +#pragma once + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +extern const std::filesystem::path testConfigFilename; +extern const std::filesystem::path testCertFilename; +extern const std::filesystem::path testKeyFilename; + +bool tcp_is_pid_listening_on(const std::string& tcp, pid_t pid, int port); +bool is_pid_listening_on(pid_t pid, int port); +void wait_for_pid_listening_on(pid_t pid, int port); +int port_from_config(const std::string& config); +void load_root_certificates(boost::asio::ssl::context& ctx); +std::pair HTTP(const std::string& target, bool ipv6 = true, bool HTTP11 = true, boost::beast::http::verb method = boost::beast::http::verb::get); +std::pair HTTPS(const std::string& target, bool ipv6 = true, bool HTTP11 = true, boost::beast::http::verb method = boost::beast::http::verb::get); -- cgit v1.2.3