mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
add test for system commands - to see what is logged
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user