Hot reload
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "HttpControlServer.h"
|
||||
#include "RuntimeControlCommand.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
@@ -170,6 +171,16 @@ void TestGenericPostCallbackHandlesControlRoutes()
|
||||
Expect(response.body.find("\"ok\":true") != std::string::npos, "generic control callback returns action success");
|
||||
}
|
||||
|
||||
void TestReloadRouteParsesAsControlCommand()
|
||||
{
|
||||
using namespace RenderCadenceCompositor;
|
||||
|
||||
RuntimeControlCommand command;
|
||||
std::string error;
|
||||
Expect(ParseRuntimeControlCommand("/api/reload", "{}", command, error), "reload route parses as a control command");
|
||||
Expect(command.type == RuntimeControlCommandType::ReloadShaders, "reload route maps to reload command type");
|
||||
}
|
||||
|
||||
void TestUnknownEndpointReturns404()
|
||||
{
|
||||
using namespace RenderCadenceCompositor;
|
||||
@@ -193,6 +204,7 @@ int main()
|
||||
TestKnownPostEndpointReturnsActionError();
|
||||
TestLayerPostEndpointsUseCallbacks();
|
||||
TestGenericPostCallbackHandlesControlRoutes();
|
||||
TestReloadRouteParsesAsControlCommand();
|
||||
TestUnknownEndpointReturns404();
|
||||
|
||||
if (gFailures != 0)
|
||||
|
||||
Reference in New Issue
Block a user