Package
ci / checks (push) Successful in 48m34s

This commit is contained in:
khodowany
2026-09-30 19:46:37 -05:00
parent 2a1aa2c67a
commit 09656a9d60
6621 changed files with 698 additions and 774 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ auto read_file(std::filesystem::path const &path) -> std::string {
}
auto healthy_payload() -> boost::json::value {
return boost::json::object{{"device", "zero"}, {"status", "ready"}, {"product", "product-vamp"}};
return boost::json::object{{"device", "zero"}, {"status", "ready"}, {"product", "product_vamp"}};
}
auto health_router(boost::json::value payload) -> ligo::service_router {
@@ -247,7 +247,7 @@ BOOST_AUTO_TEST_CASE(health_rejects_wrong_device_product_status_and_payload_type
BOOST_AUTO_TEST_CASE(health_rejects_malformed_or_failed_envelopes_and_missing_routes) {
for (std::char_t const *body : {"not JSON", "{}", "[]", "{\"ok\":true}", "{\"ok\":false}",
"{\"device\":\"zero\",\"product\":\"product-vamp\",\"status\":\"ready\"}"}) {
"{\"device\":\"zero\",\"product\":\"product_vamp\",\"status\":\"ready\"}"}) {
auto router = ligo::service_router{};
router.add_response_route("GET", "/api/health", [body](ligo::request_context, boost::json::value) -> boost::asio::awaitable<std::expected<ligo::service_response, modulus::error>> {
co_return ligo::text_response("application/json", body);