Files
moloapp/tests/example/workflow/release_test.cpp
T
retoor 3c4334cec9 feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security,
data, app, realtime, supervisor, clients, CLI, example plus
enterprise tenancy, audit, operability, governance,
supplychain. Postgres via docker compose for tests.
2026-10-23 18:20:04 +02:00

25 lines
1.0 KiB
C++

// Route: POST /workflow/release (bump, changelog, verify demo)
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto feat = f.client->post("/workflow/release",
"commits=feat(routing): add hello",
"application/x-www-form-urlencoded");
check(feat.status == 200, "status 200");
check(contains(feat.body, "\"bump\":\"minor\""), "feat maps to minor");
check(contains(feat.body, "\"version\":\"0.2.0\""), "version bumped");
check(contains(feat.body, "\"green\":true"), "checks green");
auto breaking = f.client->post(
"/workflow/release", "commits=feat!: drop old api",
"application/x-www-form-urlencoded");
check(contains(breaking.body, "\"bump\":\"major\""),
"bang maps to major");
auto bad = f.client->post("/workflow/release", "commits=nope",
"application/x-www-form-urlencoded");
check(bad.status == 400, "malformed commit rejected");
return finish("workflow/release");
}