mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
back to default test
This commit is contained in:
@@ -1019,6 +1019,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
||||
}
|
||||
|
||||
if (command == "api3") {
|
||||
ok = true;
|
||||
shell.printfln("Testing API getting values from system");
|
||||
EMSESP::system_.bool_format(BOOL_FORMAT_TRUEFALSE); // BOOL_FORMAT_TRUEFALSE_STR
|
||||
|
||||
@@ -1036,9 +1037,21 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
||||
request.url("/api/system");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/boiler");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/boiler/values");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/system");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/system/settings/locale");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/boiler/values");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/boiler/comfort");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
@@ -1051,12 +1064,19 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
||||
request.url("/api/scheduler/test_scheduler");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
// This next lot should all fail
|
||||
//
|
||||
// This next batch should all fail
|
||||
//
|
||||
|
||||
request.url("/api/boiler/bad");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/boiler/bad/value");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
request.url("/api/system/settings/locale2");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
// API failed with error unknown device (Error)
|
||||
request.url("/api/boiler2/bad");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
@@ -1069,7 +1089,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
||||
request.url("/api/scheduler/test_scheduler2");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
|
||||
ok = true;
|
||||
request.url("/api/boiler/comfort/valu");
|
||||
EMSESP::webAPIService.webAPIService(&request);
|
||||
}
|
||||
|
||||
if (command == "mqtt_post") {
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace emsesp {
|
||||
// #define EMSESP_DEBUG_DEFAULT "render"
|
||||
// #define EMSESP_DEBUG_DEFAULT "api"
|
||||
// #define EMSESP_DEBUG_DEFAULT "api2"
|
||||
#define EMSESP_DEBUG_DEFAULT "api3"
|
||||
// #define EMSESP_DEBUG_DEFAULT "api3"
|
||||
// #define EMSESP_DEBUG_DEFAULT "crash"
|
||||
// #define EMSESP_DEBUG_DEFAULT "dv"
|
||||
// #define EMSESP_DEBUG_DEFAULT "lastcode"
|
||||
|
||||
Reference in New Issue
Block a user