From 0054a89c3889bf955ac6ebd8c4dcedc0834b07d6 Mon Sep 17 00:00:00 2001 From: proddy Date: Wed, 24 Jul 2024 09:33:39 +0200 Subject: [PATCH] add test for system commands - to see what is logged --- src/test/test.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/test/test.cpp b/src/test/test.cpp index 5ddbf879a..187843d14 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -953,8 +953,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const bool single; - // single = true; - single = false; + single = true; + // single = false; AsyncWebServerRequest request; JsonDocument doc; @@ -968,18 +968,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const if (single) { // run dedicated tests only - EMSESP::webCustomEntityService.test(); // custom entities - EMSESP::webCustomizationService.test(); // set customizations - this will overwrite any settings in the FS - EMSESP::temperaturesensor_.test(); // add temperature sensors - EMSESP::webSchedulerService.test(); // run scheduler tests, and conditions + // EMSESP::webCustomEntityService.test(); // custom entities + // EMSESP::webCustomizationService.test(); // set customizations - this will overwrite any settings in the FS + // EMSESP::temperaturesensor_.test(); // add temperature sensors + // EMSESP::webSchedulerService.test(); // run scheduler tests, and conditions + shell.invoke_command("call system fetch"); request.method(HTTP_GET); - - request.url("/api/boiler/bad"); - EMSESP::webAPIService.webAPIService(&request); - request.url("/api/boiler/bad/value"); - EMSESP::webAPIService.webAPIService(&request); - request.url("/api/boiler/bad/valu"); + request.url("/api/system/fetch"); EMSESP::webAPIService.webAPIService(&request); } else { @@ -1029,6 +1025,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const EMSESP::webAPIService.webAPIService(&request); request.url("/api/system/settings/locale"); EMSESP::webAPIService.webAPIService(&request); + request.url("/api/system/fetch"); + EMSESP::webAPIService.webAPIService(&request); // scheduler request.url("/api/scheduler");