From 5cbb93ef14a75bed39fa4e0f82bbdff597c94f7f Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Mon, 10 Jul 2023 11:09:40 +0800 Subject: [PATCH] Add test for cache timeout getter Signed-off-by: Pengyu Lv --- tests/src/test_helpers/ssl_helpers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/src/test_helpers/ssl_helpers.c b/tests/src/test_helpers/ssl_helpers.c index 8e67352662..5f203ab27d 100644 --- a/tests/src/test_helpers/ssl_helpers.c +++ b/tests/src/test_helpers/ssl_helpers.c @@ -93,6 +93,10 @@ void mbedtls_test_init_handshake_options( opts->cache = NULL; ASSERT_ALLOC(opts->cache, 1); mbedtls_ssl_cache_init(opts->cache); +#if defined(MBEDTLS_HAVE_TIME) + TEST_EQUAL(mbedtls_ssl_cache_get_timeout(opts->cache), + MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT); +#endif exit: return; #endif