add test for system commands - to see what is logged

This commit is contained in:
proddy
2024-07-24 09:33:39 +02:00
parent 5c2aa63842
commit 0054a89c38

View File

@@ -953,8 +953,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
bool single; bool single;
// single = true; single = true;
single = false; // single = false;
AsyncWebServerRequest request; AsyncWebServerRequest request;
JsonDocument doc; JsonDocument doc;
@@ -968,18 +968,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
if (single) { if (single) {
// run dedicated tests only // run dedicated tests only
EMSESP::webCustomEntityService.test(); // custom entities // EMSESP::webCustomEntityService.test(); // custom entities
EMSESP::webCustomizationService.test(); // set customizations - this will overwrite any settings in the FS // EMSESP::webCustomizationService.test(); // set customizations - this will overwrite any settings in the FS
EMSESP::temperaturesensor_.test(); // add temperature sensors // EMSESP::temperaturesensor_.test(); // add temperature sensors
EMSESP::webSchedulerService.test(); // run scheduler tests, and conditions // EMSESP::webSchedulerService.test(); // run scheduler tests, and conditions
shell.invoke_command("call system fetch");
request.method(HTTP_GET); request.method(HTTP_GET);
request.url("/api/system/fetch");
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");
EMSESP::webAPIService.webAPIService(&request); EMSESP::webAPIService.webAPIService(&request);
} else { } else {
@@ -1029,6 +1025,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
EMSESP::webAPIService.webAPIService(&request); EMSESP::webAPIService.webAPIService(&request);
request.url("/api/system/settings/locale"); request.url("/api/system/settings/locale");
EMSESP::webAPIService.webAPIService(&request); EMSESP::webAPIService.webAPIService(&request);
request.url("/api/system/fetch");
EMSESP::webAPIService.webAPIService(&request);
// scheduler // scheduler
request.url("/api/scheduler"); request.url("/api/scheduler");