feat(workflow): example covers security, platform, enterprise and resilience features
105 route tests, matrix crawl, spec and README updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Route: GET /audit/mask (masking and redaction patterns)
|
||||
#include "support/Assert.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
using molo::example::fw::Method;
|
||||
|
||||
int main() {
|
||||
Fixture f;
|
||||
auto d = f.client->get("/audit/mask");
|
||||
check(d.status == 200 && contains(d.body, "a***********@example.com"), "email masked");
|
||||
check(contains(d.body, "************1111"), "card keeps last 4");
|
||||
check(contains(d.body, "[EMAIL]") && contains(d.body, "[SSN]") && contains(d.body, "[IP]"), "redactions");
|
||||
check(contains(d.body, "\"redactions\":4"), "counted 4 hits");
|
||||
auto c = f.client->get("/audit/mask?text=nothing+here");
|
||||
check(contains(c.body, "\"redactions\":0"), "clean text unchanged");
|
||||
check(f.client->post("/audit/mask").status == 405, "405");
|
||||
return finish("audit/mask");
|
||||
}
|
||||
Reference in New Issue
Block a user