FreeRTOS: HTTPS Client
HTTPS Client v1.0.0 library
Return to main page ↑
iot_tests_https_utils.c File Reference

Tests for the user-facing API functions declared in iot_https_utils.h. More...

#include "iot_config.h"
#include <string.h>
#include "iot_https_utils.h"
#include "unity_fixture.h"

Macros

#define HTTPS_TEST_URL_HTTPS   "https://mybucket.s3.amazonaws.com/myobject.txt?AWSAccessKeyId=AAAAAAAAAAAAAAAAAAAA&Expires=0000000000&Signature=abcde%2fghijklmn%2pqrstuvwxyzAB%3D"
 Test URL with "https://"" prepending and query.
 
#define HTTPS_TEST_URL_HTTPS_EXPECTED_PATH   "/myobject.txt"
 The path to the test URL above.
 
#define HTTPS_TSET_URL_HTTPS_EXPECTED_ADDRESS   "mybucket.s3.amazonaws.com"
 The address to the test URL above.
 
#define HTTPS_TEST_URL_WWW   "https://www.amazon.com/gp/css/order-history?ref_=nav_orders_first"
 Test URL with wwww.
 
#define HTTPS_TEST_URL_WWW_EXPECTED_PATH   "/gp/css/order-history"
 The path to the test URL above.
 
#define HTTPS_TEST_URL_WWW_EXPECTED_ADDRESS   "www.amazon.com"
 The address to the test URL above.
 
#define HTTPS_TEST_URL_NO_PATH   "https://www.aws.amazon.com"
 Test URL without a path.
 
#define HTTPS_TEST_URL_NO_PATH_EXPECTED_PATH   NULL
 The path to the test URL above.
 
#define HTTPS_TEST_URL_NO_PATH_EXPECTED_ADDRESS   "www.aws.amazon.com"
 The address to the test URL above.
 
#define HTTPS_TEST_URL_NO_ADDRESS   "/no/address/path?q=q"
 Test URL without a path.
 
#define HTTPS_TEST_URL_NO_ADDRESS_EXPECTED_PATH   NULL
 The path to the test URL above.
 
#define HTTPS_TEST_URL_NO_ADDRESS_EXPECTED_ADDRESS   NULL
 The address to the test URL above.
 
#define HTTPS_TEST_INVALID_URL   "invalid_url/invalid_path"
 Invalid URL.
 

Functions

 TEST_GROUP (HTTPS_Utils_Unit_API)
 Test group for HTTPS Utils API tests.
 
 TEST_SETUP (HTTPS_Utils_Unit_API)
 Test setup for HTTPS Utils API tests.
 
 TEST_TEAR_DOWN (HTTPS_Utils_Unit_API)
 Test tear down for HTTPS Utils API tests.
 
 TEST_GROUP_RUNNER (HTTPS_Utils_Unit_API)
 Test group runner for HTTPS Utils API tests.
 
 TEST (HTTPS_Utils_Unit_API, GetUrlPathInvalidParameters)
 Test various invlaid parameters into IotHttpsClient_GetUrlPath().
 
 TEST (HTTPS_Utils_Unit_API, GetUrlPathVerifications)
 Test parsing the path from various different forms of URLs.
 
 TEST (HTTPS_Utils_Unit_API, GetUrlAddressInvalidParameters)
 Test various invlaid parameters into IotHttpsClient_GetUrlAddress().
 
 TEST (HTTPS_Utils_Unit_API, GetUrlAddressVerifications)
 Test parsing the address from various different forms of URLs.
 

Detailed Description

Tests for the user-facing API functions declared in iot_https_utils.h.