join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
HttpsTest Class Reference

Class used to test the HTTPS API. More...

Inheritance diagram for HttpsTest:
Collaboration diagram for HttpsTest:

Static Public Member Functions

static void SetUpTestCase ()
 Set up test case.
 
static void TearDownTestCase ()
 Tear down test case.
 

Protected Member Functions

void SetUp ()
 Sets up the test fixture.
 
void TearDown ()
 Tears down the test fixture.
 

Static Protected Member Functions

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 Protected Attributes

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.
 

Detailed Description

Class used to test the HTTPS API.

Member Function Documentation

◆ accessHandler()

static bool HttpsTest::accessHandler ( const std::string & type,
const std::string & token,
std::error_code & errc )
inlinestaticprotected

handle authentication.

Parameters
typeauthorization type.
tokensession token.
errcerror code.
Returns
true on success, false otherwise.

◆ getHandler()

static void HttpsTest::getHandler ( Https::Worker * worker)
inlinestaticprotected

handle dynamic get content.

Parameters
workerworker thread context.

◆ postHandler()

static void HttpsTest::postHandler ( Https::Worker * worker)
inlinestaticprotected

handle dynamic post content.

Parameters
workerworker thread context.

◆ SetUp()

void HttpsTest::SetUp ( )
inlineprotected

Sets up the test fixture.

◆ SetUpTestCase()

static void HttpsTest::SetUpTestCase ( )
inlinestatic

Set up test case.

◆ TearDown()

void HttpsTest::TearDown ( )
inlineprotected

Tears down the test fixture.

◆ TearDownTestCase()

static void HttpsTest::TearDownTestCase ( )
inlinestatic

Tear down test case.

Member Data Documentation

◆ _basePath

const std::string HttpsTest::_basePath = "/tmp/www"
staticprotected

base path.

◆ _certFile

const std::string HttpsTest::_certFile = _certPath + "/https_test.cert"
staticprotected

certificate file.

◆ _certPath

const std::string HttpsTest::_certPath = "/tmp/certs"
staticprotected

certificate path.

◆ _host

const std::string HttpsTest::_host = "localhost"
staticprotected

server hostname.

◆ _key

const std::string HttpsTest::_key = "/tmp/https_test.key"
staticprotected

private key.

◆ _max

const int HttpsTest::_max = 20
staticprotected

server keep alive max requests.

◆ _port

const uint16_t HttpsTest::_port = 5000
staticprotected

server port.

◆ _rootcert

const std::string HttpsTest::_rootcert = "/tmp/https_test_root.cert"
staticprotected

root certificate.

◆ _sample

const std::string HttpsTest::_sample = "<html><body><h1>It works!</h1></body></html>"
staticprotected

sample.

◆ _sampleFile

const std::string HttpsTest::_sampleFile = _basePath + "/" + _sampleFileName
staticprotected

sample path.

◆ _sampleFileName

const std::string HttpsTest::_sampleFileName = "sample.html"
staticprotected

sample file name.

◆ _timeout

const int HttpsTest::_timeout = 5
staticprotected

server keep alive timeout.

◆ _token

const std::string HttpsTest::_token = "adlSaJkmBLpgnRRCjkCgQ4uaCagKHsIN"
staticprotected

session token.


The documentation for this class was generated from the following file: