aligning changes with standalone test version

This commit is contained in:
proddy
2020-10-19 23:15:48 +02:00
parent 4fc26dbb44
commit 6e7728a5f7
2 changed files with 35 additions and 33 deletions

View File

@@ -13,38 +13,38 @@
class DummySettings { class DummySettings {
public: public:
uint8_t tx_mode = 1; uint8_t tx_mode = 1;
uint8_t ems_bus_id = 0x0B; uint8_t ems_bus_id = 0x0B;
int8_t syslog_level = 1; // uuid::log::Level int8_t syslog_level = 1; // uuid::log::Level
uint32_t syslog_mark_interval = 0; uint32_t syslog_mark_interval = 0;
String syslog_host = "192.168.1.4"; String syslog_host = "192.168.1.4";
uint8_t master_thermostat = 0; uint8_t master_thermostat = 0;
bool shower_timer = false; bool shower_timer = false;
bool shower_alert = false; bool shower_alert = false;
bool hide_led = false; bool hide_led = false;
bool api_enabled = true; bool api_enabled = true;
uint16_t publish_time = 10; // seconds uint16_t publish_time = 10; // seconds
uint8_t mqtt_format = 3; // 1=single, 2=nested, 3=ha, 4=custom uint8_t mqtt_format = 3; // 1=single, 2=nested, 3=ha, 4=custom
uint8_t mqtt_qos = 0; uint8_t mqtt_qos = 0;
bool mqtt_retain = false; bool mqtt_retain = false;
bool enabled = true; // MQTT bool enabled = true; // MQTT
String hostname = "ems-esp"; String hostname = "ems-esp";
String jwtSecret = "ems-esp"; String jwtSecret = "ems-esp";
String ssid = "ems-esp"; String ssid = "ems-esp";
String password = "ems-esp"; String password = "ems-esp";
String localIP; String localIP = "";
String gatewayIP; String gatewayIP = "";
String subnetMask; String subnetMask = "";
String staticIPConfig; String staticIPConfig = "";
String dnsIP1; String dnsIP1 = "";
String dnsIP2; String dnsIP2 = "";
uint16_t publish_time_boiler; uint16_t publish_time_boiler = 10;
uint16_t publish_time_thermostat; uint16_t publish_time_thermostat = 10;
uint16_t publish_time_solar; uint16_t publish_time_solar = 10;
uint16_t publish_time_mixing; uint16_t publish_time_mixing = 10;
uint16_t publish_time_other; uint16_t publish_time_other = 10;
uint16_t publish_time_sensor; uint16_t publish_time_sensor = 10;
uint8_t bool_format; uint8_t bool_format = 1; // on off
static void read(DummySettings & settings, JsonObject & root){}; static void read(DummySettings & settings, JsonObject & root){};
static void read(DummySettings & settings){}; static void read(DummySettings & settings){};

View File

@@ -27,7 +27,7 @@ namespace emsesp {
// used with the 'test' command, under su/admin // used with the 'test' command, under su/admin
void Test::run_test(uuid::console::Shell & shell, const std::string & command) { void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
if (command == "default") { if (command == "default") {
run_test(shell, "render"); // add the default test case here run_test(shell, "general"); // add the default test case here
} }
if (command.empty()) { if (command.empty()) {
@@ -258,6 +258,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
0x03, 0x25, 0x03, 0x03, 0x01, 0x03, 0x25, 0x00, 0xC8, 0x00, 0x00, 0x11, 0x01, 0x03}); 0x03, 0x25, 0x03, 0x03, 0x01, 0x03, 0x25, 0x00, 0xC8, 0x00, 0x00, 0x11, 0x01, 0x03});
shell.invoke_command("show"); shell.invoke_command("show");
shell.invoke_command("publish");
shell.invoke_command("show mqtt");
} }
if (command == "fr120") { if (command == "fr120") {