Compile complete manager helper chain in host fixtures
The table-based manager allowlists call commandListMatches. Include that production dependency in the fleet enrollment, ACL CLI, and Morse authorization fixtures so their existing permission assertions execute. Firmware behavior and test assertions are unchanged. Validation: all five tests across test_fleet_role_wiring.py, test_client_acl_cli.py, and test_morse_auth.py pass, including both rule-engine modes and both ACL capacities.
This commit is contained in:
1 parent
db1c4704e0
commit
f869042386
3 files changed
+6
-3
No files matched your search
@@ -79,7 +79,8 @@ class ClientAclCliTest(unittest.TestCase):
|
||||
generated += extract_braced(utils, signature) + "\n"
|
||||
generated += "}\n"
|
||||
for signature in (
|
||||
"static bool commandFamilyMatches(", "static bool isCommonManagerReadOnlyAllowed(",
|
||||
"static bool commandFamilyMatches(", "static bool commandListMatches(",
|
||||
"static bool isCommonManagerReadOnlyAllowed(",
|
||||
"static bool isRegionMgrAllowed(", "static bool isFilterMgrAllowed(",
|
||||
):
|
||||
generated += extract_braced(sources["repeater"], signature) + "\n"
|
||||
|
||||
@@ -352,7 +352,8 @@ class FleetRoleWiringTests(unittest.TestCase):
|
||||
self.assertIsNotNone(compiler)
|
||||
repeater = (ROOT / "examples/simple_repeater/MyMesh.cpp").read_text()
|
||||
helpers = "\n".join(body(repeater, signature) for signature in (
|
||||
"static bool commandFamilyMatches(", "static bool isCommonManagerReadOnlyAllowed(",
|
||||
"static bool commandFamilyMatches(", "static bool commandListMatches(",
|
||||
"static bool isCommonManagerReadOnlyAllowed(",
|
||||
"static bool isRegionMgrAllowed(", "static bool isFilterMgrAllowed(",
|
||||
))
|
||||
handler = body(repeater, "void MyMesh::handleCommand(uint32_t sender_timestamp,")
|
||||
|
||||
@@ -130,7 +130,8 @@ class MorseAuthorizationTests(unittest.TestCase):
|
||||
# the previous unguarded production branch must fail the C++ asserts.
|
||||
handoff = handler[start:end]
|
||||
helpers = "\n".join(extract_braced(source, signature) for signature in (
|
||||
"static bool commandFamilyMatches(", "static bool isCommonManagerReadOnlyAllowed(",
|
||||
"static bool commandFamilyMatches(", "static bool commandListMatches(",
|
||||
"static bool isCommonManagerReadOnlyAllowed(",
|
||||
"static bool isRegionMgrAllowed(", "static bool isFilterMgrAllowed(",
|
||||
))
|
||||
helpers = f'#include "{(ROOT / "src/helpers/FloodCommandAliases.h").as_posix()}"\n' + helpers
|
||||
|
||||
Reference in new issue
Block a user