Gate insecure capabilities behind footgun feature

This commit is contained in:
Brandon Vandegrift 2025-05-08 21:05:28 -04:00
parent 29eeebd9c1
commit 7a2a8ae4cb
15 changed files with 143 additions and 77 deletions

View file

@ -34,9 +34,15 @@ async def test_routing_contexts(api_connection: veilid.VeilidAPI):
)
await rc.release()
rc = await (await api_connection.new_routing_context()).with_safety(
veilid.SafetySelection.unsafe(veilid.Sequencing.PREFER_ORDERED)
)
# Test that creating an Unsafe routing context throws an error
# as mentioned in the CHANGELOG (footgun feature disabled by default)
rc = await api_connection.new_routing_context()
with pytest.raises(Exception):
rc = await rc.with_safety(
veilid.SafetySelection.unsafe(veilid.Sequencing.PREFER_ORDERED)
)
await rc.release()