Finish writing tests for commands, fix resolution being accidentally set to lower one, improve fixtures - need rewrite

This commit is contained in:
Lorow
2025-12-06 22:42:48 +01:00
parent e2d0981e0e
commit abd10fc61a
6 changed files with 340 additions and 46 deletions

View File

@@ -5,7 +5,7 @@
CommandResult setWiFiCommand(std::shared_ptr<DependencyRegistry> registry, const nlohmann::json &json)
{
#if !CONFIG_GENERAL_ENABLE_WIRELESS
return CommandResult::getErrorResult("Not supported by current firmware");
return CommandResult::getErrorResult("Not supported by current firmware");
#endif
auto payload = json.get<WifiPayload>();
@@ -33,7 +33,7 @@ CommandResult setWiFiCommand(std::shared_ptr<DependencyRegistry> registry, const
CommandResult deleteWiFiCommand(std::shared_ptr<DependencyRegistry> registry, const nlohmann::json &json)
{
#if !CONFIG_GENERAL_ENABLE_WIRELESS
return CommandResult::getErrorResult("Not supported by current firmware");
return CommandResult::getErrorResult("Not supported by current firmware");
#endif
const auto payload = json.get<deleteNetworkPayload>();
@@ -49,7 +49,7 @@ CommandResult deleteWiFiCommand(std::shared_ptr<DependencyRegistry> registry, co
CommandResult updateWiFiCommand(std::shared_ptr<DependencyRegistry> registry, const nlohmann::json &json)
{
#if !CONFIG_GENERAL_ENABLE_WIRELESS
return CommandResult::getErrorResult("Not supported by current firmware");
return CommandResult::getErrorResult("Not supported by current firmware");
#endif
auto payload = json.get<UpdateWifiPayload>();
@@ -82,7 +82,7 @@ CommandResult updateWiFiCommand(std::shared_ptr<DependencyRegistry> registry, co
CommandResult updateAPWiFiCommand(std::shared_ptr<DependencyRegistry> registry, const nlohmann::json &json)
{
#if !CONFIG_GENERAL_ENABLE_WIRELESS
return CommandResult::getErrorResult("Not supported by current firmware");
return CommandResult::getErrorResult("Not supported by current firmware");
#endif
const auto payload = json.get<UpdateAPWiFiPayload>();