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;
// 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");