You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(tests): security/test_redis_network_isolation.py needs REDIS_BACKEND_PASSWORD env var or a skip-when-unset guard #764
3 tests in tests/security/test_redis_network_isolation.py fail with KeyError: 'REDIS_BACKEND_PASSWORD':
test_platform_container_can_authenticate
test_backend_acl_blocks_flushall
test_backend_acl_blocks_config_get
The variable is set in production .env but is NOT exported by tests/run-full.sh or required by tests/requirements-test.txt's implicit env contract. The fixture reads it directly via os.environ["REDIS_BACKEND_PASSWORD"], so any contributor who hasn't pre-exported the variable hits a hard KeyError.
Context
Discovered via full test suite run on 2026-05-09. Per architecture.md "Network Topology (Issue #589)", the variable is the password for the Redis ACL backend user — required only if you want these tests to actually exercise the platform-network ACL.
Acceptance Criteria
Pick one option:
Option 1 (recommended): skip-when-unset
Wrap the affected fixtures in:
if"REDIS_BACKEND_PASSWORD"notinos.environ:
pytest.skip("REDIS_BACKEND_PASSWORD not set; skipping platform-network ACL test")
All 3 tests skip cleanly when the var is unset, run normally when it's set.
Document the env requirement in tests/security/README.md (if absent, add a one-line note).
Option 2: source .env in run scripts
tests/run-full.sh and tests/run-core.sh source ../.env before running pytest.
Risk: leaks other production secrets into CI test logs unless gated by a --security flag.
Option 1 is non-invasive and follows the pattern other live-backend tests already use (e.g. WhatsApp integration tests skip without Twilio binding). Option 2 risks broader secret exposure.
Activity
fix(tests): skip-when-unset guard for REDIS_BACKEND_PASSWORD (#764) (#…
vybe commentedon Jun 1, 2026
Shipped in v0.6.0 (released via #998).