|
FreeRTOS:
HTTPS Client
HTTPS Client v1.0.0 library
|
| Return to main page ↑ |
Full integration tests for the HTTPS Client library. More...
#include "iot_config.h"#include "iot_init.h"#include "private/iot_https_internal.h"#include "iot_https_utils.h"#include <IOT_TEST_NETWORK_HEADER>#include "unity_fixture.h"#include "aws_test_utils.h"Data Structures | |
| struct | _asyncVerificationParams_t |
| Context to the HTTP asynchronous workflow callbacks to verify operation. More... | |
Macros | |
| #define | IOT_TEST_HTTPS_SERVER_HOST_NAME "postman-echo.com" |
| The DNS resolvable host name of the server to perform testing. More... | |
| #define | IOT_TEST_HTTPS_PORT ( ( uint16_t ) 80 ) |
| The socket port of the server to connect to. | |
| #define | IOT_TEST_HTTPS_ALPN_PROTOCOLS NULL |
| ALPN protocols string. | |
| #define | IOT_TEST_HTTPS_ROOT_CA |
| Root certificate authority to verify the server connecting to. More... | |
| #define | IOT_TEST_HTTPS_CLIENT_CERTIFICATE keyCLIENT_CERTIFICATE_PEM |
| Client certificate configuration. More... | |
| #define | IOT_TEST_HTTPS_CLIENT_PRIVATE_KEY keyCLIENT_PRIVATE_KEY_PEM |
| Client private key configuration. | |
| #define | IOT_TEST_HTTPS_SYNC_TIMEOUT_MS ( ( uint32_t ) 10000 ) |
| Timeout in milliseconds for tests that synchronously send HTTP requests. More... | |
| #define | IOT_TEST_HTTPS_ASYNC_TIMEOUT_MS ( ( uint32_t ) 10000 ) |
| Timeout in milliseconds for tests asynchronously sending HTTP requests. More... | |
| #define | IOT_TEST_HTTPS_INITIAL_CONNECTION_RETRY_DELAY ( ( uint32_t ) 300 ) |
| The initial delay in milliseconds that is doubled each retry of server connection. | |
| #define | IOT_TEST_HTTPS_CONNECTION_NUM_RETRIES ( ( int32_t ) 3 ) |
| The amount of times to retry the server connection if it fails. | |
| #define | HTTPS_TEST_CONN_USER_BUFFER_SIZE ( 512 ) |
| The size of the connection user buffer to use among the tests. | |
| #define | HTTPS_TEST_REQ_USER_BUFFER_SIZE ( 512 ) |
| The size of the request user buffer to use among the tests. | |
| #define | HTTPS_TEST_RESP_USER_BUFFER_SIZE ( 512 ) |
| The size of the respons user buffer to use among the tests. | |
| #define | HTTPS_TEST_RESP_BODY_BUFFER_SIZE ( 512 ) |
| The size of the response body buffer to use among the tests. | |
| #define | HTTPS_TEST_GET_REQUEST_PATH "/get" |
| The HTTP path for the get request. | |
| #define | HTTPS_TEST_PUT_REQUEST_PATH "/put" |
| The HTTP path for the put request. | |
| #define | HTTPS_TEST_POST_REQUEST_PATH "/post" |
| The HTTP path for the post request. | |
| #define | HTTPS_TEST_MESSAGE_BODY |
| The HTTP post and put message body data. More... | |
| #define | HTTPS_TEST_MESSAGE_BODY_LENGTH ( sizeof( HTTPS_TEST_MESSAGE_BODY ) - 1 ) |
| The length of the HTTP test request message body. | |
Functions | |
| static void | _readReadyCallback (void *pPrivData, IotHttpsResponseHandle_t respHandle, IotHttpsReturnCode_t rc, uint16_t status) |
| Asynchronous IotHttpsClientCallbacks_t.readReadyCallback implementation to share among the tests. | |
| static void | _responseCompleteCallback (void *pPrivData, IotHttpsResponseHandle_t respHandle, IotHttpsReturnCode_t rc, uint16_t status) |
| Asynchronous IotHttpsClientCallbacks_t.responseCompleteCallback implementation to share among the tests. | |
| static void | _testRequestSynchronous (bool isNonPersistent, IotHttpsMethod_t method) |
| Send a GET request synchronously and verify the results. | |
| static void | _testRequestAsynchronous (bool isNonPersistent, IotHttpsMethod_t method) |
| Send a GET request asynchronously and verify the results. | |
| TEST_GROUP (HTTPS_Client_System) | |
| Test group for HTTPS Client system tests. | |
| TEST_SETUP (HTTPS_Client_System) | |
| Test setup for the HTTP Client system tests. | |
| TEST_TEAR_DOWN (HTTPS_Client_System) | |
| Test teardown for the HTTP Client system tests. | |
| TEST_GROUP_RUNNER (HTTPS_Client_System) | |
| Test group runner for HTTPS Client System integration tests. | |
| TEST (HTTPS_Client_System, GetRequestSynchronousPersistent) | |
| Verify a persistent GET request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, GetRequestSynchronousNonPersistent) | |
| Verify a non-persistent GET request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, GetRequestAsynchronousPersistent) | |
| Verify a GET request to the test server sent asynchronously. | |
| TEST (HTTPS_Client_System, GetRequestAsynchronousNonPersistent) | |
| Verify a GET request to the test server sent asynchronously. | |
| TEST (HTTPS_Client_System, HeadRequestSynchronousPersistent) | |
| Verify a persistent HEAD request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, HeadRequestSynchronousNonPersistent) | |
| Verify a non-persistent HEAD request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, HeadRequestAsynchronousPersistent) | |
| Verify a HEAD request to the test server sent asynchronously. | |
| TEST (HTTPS_Client_System, HeadRequestAsynchronousNonPersistent) | |
| Verify a HEAD request to the test server sent asynchronously. | |
| TEST (HTTPS_Client_System, PutRequestSynchronousPersistent) | |
| Verify a persistent PUT request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, PutRequestSynchronousNonPersistent) | |
| Verify a non-persistent PUT request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, PutRequestAsynchronousPersistent) | |
| Verify a PUT request to the test server sent asynchronously. | |
| TEST (HTTPS_Client_System, PutRequestAsynchronousNonPersistent) | |
| Verify a PUT request to the test server sent asynchronously. | |
| TEST (HTTPS_Client_System, PostRequestSynchronousPersistent) | |
| Verify a persistent POST request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, PostRequestSynchronousNonPersistent) | |
| Verify a non-persistent POST request to the test server sent synchronously. | |
| TEST (HTTPS_Client_System, PostRequestAsynchronousPersistent) | |
| Verify a POST request to the test server sent asynchronously. | |
| TEST (HTTPS_Client_System, PostRequestAsynchronousNonPersistent) | |
| Verify a POST request to the test server sent asynchronously. | |
Variables | |
| static uint8_t | _pConnUserBuffer [HTTPS_TEST_CONN_USER_BUFFER_SIZE] = { 0 } |
| HTTPS Client connection user buffer to share among the tests. | |
| static uint8_t | _pReqUserBuffer [HTTPS_TEST_REQ_USER_BUFFER_SIZE] = { 0 } |
| HTTPS Request user buffer to share among the tests. | |
| static uint8_t | _pRespUserBuffer [HTTPS_TEST_RESP_USER_BUFFER_SIZE] = { 0 } |
| HTTPS Response user buffer to share among the tests. | |
| static uint8_t | _pRespBodyBuffer [HTTPS_TEST_RESP_BODY_BUFFER_SIZE] = { 0 } |
| HTTPS Response body buffer to share among the tests. | |
| static IotHttpsConnectionInfo_t | _connInfo |
| A IotHttpsConnectionInfo_t to share among the tests. More... | |
Full integration tests for the HTTPS Client library.
| #define IOT_TEST_HTTPS_SERVER_HOST_NAME "postman-echo.com" |
| #define IOT_TEST_HTTPS_ROOT_CA |
Root certificate authority to verify the server connecting to.
| #define IOT_TEST_HTTPS_CLIENT_CERTIFICATE keyCLIENT_CERTIFICATE_PEM |
Client certificate configuration.
Client certificate and private key configurations.
With PKCS #11 provisioning of the internally stored keys these parameters are deprecated.
| #define IOT_TEST_HTTPS_SYNC_TIMEOUT_MS ( ( uint32_t ) 10000 ) |
Timeout in milliseconds for tests that synchronously send HTTP requests.
This timeout encompasses the waiting time for the both sending of the request and receiving the response.
| #define IOT_TEST_HTTPS_ASYNC_TIMEOUT_MS ( ( uint32_t ) 10000 ) |
Timeout in milliseconds for tests asynchronously sending HTTP requests.
This timeout is use to wait for the asynchronous test to finish.
| #define HTTPS_TEST_MESSAGE_BODY |
The HTTP post and put message body data.
|
static |
A IotHttpsConnectionInfo_t to share among the tests.