Class used to test the HTTPS API.
More...
|
| void | SetUp () |
| | Sets up the test fixture.
|
| |
| void | TearDown () |
| | Tears down the test fixture.
|
| |
|
| static bool | accessHandler (const std::string &type, const std::string &token, std::error_code &errc) |
| | handle authentication.
|
| |
| static void | getHandler (Https::Worker *worker) |
| | handle dynamic get content.
|
| |
| static void | postHandler (Https::Worker *worker) |
| | handle dynamic post content.
|
| |
|
| static const std::string | _basePath = "/tmp/www" |
| | base path.
|
| |
| static const std::string | _sample = "<html><body><h1>It works!</h1></body></html>" |
| | sample.
|
| |
| static const std::string | _sampleFileName = "sample.html" |
| | sample file name.
|
| |
| static const std::string | _sampleFile = _basePath + "/" + _sampleFileName |
| | sample path.
|
| |
| static const std::string | _token = "adlSaJkmBLpgnRRCjkCgQ4uaCagKHsIN" |
| | session token.
|
| |
| static const std::string | _host = "localhost" |
| | server hostname.
|
| |
| static const uint16_t | _port = 5000 |
| | server port.
|
| |
| static const int | _timeout = 5 |
| | server keep alive timeout.
|
| |
| static const int | _max = 20 |
| | server keep alive max requests.
|
| |
| static const std::string | _rootcert = "/tmp/https_test_root.cert" |
| | root certificate.
|
| |
| static const std::string | _certPath = "/tmp/certs" |
| | certificate path.
|
| |
| static const std::string | _certFile = _certPath + "/https_test.cert" |
| | certificate file.
|
| |
| static const std::string | _key = "/tmp/https_test.key" |
| | private key.
|
| |
Class used to test the HTTPS API.
◆ accessHandler()
| static bool HttpsTest::accessHandler |
( |
const std::string & | type, |
|
|
const std::string & | token, |
|
|
std::error_code & | errc ) |
|
inlinestaticprotected |
handle authentication.
- Parameters
-
| type | authorization type. |
| token | session token. |
| errc | error code. |
- Returns
- true on success, false otherwise.
◆ getHandler()
| static void HttpsTest::getHandler |
( |
Https::Worker * | worker | ) |
|
|
inlinestaticprotected |
handle dynamic get content.
- Parameters
-
| worker | worker thread context. |
◆ postHandler()
| static void HttpsTest::postHandler |
( |
Https::Worker * | worker | ) |
|
|
inlinestaticprotected |
handle dynamic post content.
- Parameters
-
| worker | worker thread context. |
◆ SetUp()
| void HttpsTest::SetUp |
( |
| ) |
|
|
inlineprotected |
Sets up the test fixture.
◆ SetUpTestCase()
| static void HttpsTest::SetUpTestCase |
( |
| ) |
|
|
inlinestatic |
◆ TearDown()
| void HttpsTest::TearDown |
( |
| ) |
|
|
inlineprotected |
Tears down the test fixture.
◆ TearDownTestCase()
| static void HttpsTest::TearDownTestCase |
( |
| ) |
|
|
inlinestatic |
◆ _basePath
| const std::string HttpsTest::_basePath = "/tmp/www" |
|
staticprotected |
◆ _certFile
| const std::string HttpsTest::_certFile = _certPath + "/https_test.cert" |
|
staticprotected |
◆ _certPath
| const std::string HttpsTest::_certPath = "/tmp/certs" |
|
staticprotected |
◆ _host
| const std::string HttpsTest::_host = "localhost" |
|
staticprotected |
◆ _key
| const std::string HttpsTest::_key = "/tmp/https_test.key" |
|
staticprotected |
◆ _max
| const int HttpsTest::_max = 20 |
|
staticprotected |
server keep alive max requests.
◆ _port
| const uint16_t HttpsTest::_port = 5000 |
|
staticprotected |
◆ _rootcert
| const std::string HttpsTest::_rootcert = "/tmp/https_test_root.cert" |
|
staticprotected |
◆ _sample
| const std::string HttpsTest::_sample = "<html><body><h1>It works!</h1></body></html>" |
|
staticprotected |
◆ _sampleFile
◆ _sampleFileName
| const std::string HttpsTest::_sampleFileName = "sample.html" |
|
staticprotected |
◆ _timeout
| const int HttpsTest::_timeout = 5 |
|
staticprotected |
server keep alive timeout.
◆ _token
| const std::string HttpsTest::_token = "adlSaJkmBLpgnRRCjkCgQ4uaCagKHsIN" |
|
staticprotected |
The documentation for this class was generated from the following file: