From 6a4033b8a723c213d344ccf35f1abe62dff49230 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Mon, 16 Apr 2018 14:41:34 +0500 Subject: [PATCH] nvs: fix nvs_get_stats unit test Changed check for the returned parameter from ESP_ERR_NVS_PART_NOT_FOUND to ESP_ERR_NVS_NOT_INITIALIZED. --- components/nvs_flash/test/test_nvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nvs_flash/test/test_nvs.c b/components/nvs_flash/test/test_nvs.c index 294c3f644..87ca51994 100644 --- a/components/nvs_flash/test/test_nvs.c +++ b/components/nvs_flash/test/test_nvs.c @@ -71,7 +71,7 @@ TEST_CASE("calculate used and free space", "[nvs]") TEST_ESP_ERR(nvs_get_stats(NULL, NULL), ESP_ERR_INVALID_ARG); nvs_stats_t stat1; nvs_stats_t stat2; - TEST_ESP_ERR(nvs_get_stats(NULL, &stat1), ESP_ERR_NVS_PART_NOT_FOUND); + TEST_ESP_ERR(nvs_get_stats(NULL, &stat1), ESP_ERR_NVS_NOT_INITIALIZED); TEST_ASSERT_TRUE(stat1.free_entries == 0); TEST_ASSERT_TRUE(stat1.namespace_count == 0); TEST_ASSERT_TRUE(stat1.total_entries == 0);