Skip to content

fix(tests): set credentialed REDIS_URL in scheduler config test fixtures #755

Closed

Description

@vybe

Summary

5 tests in `tests/scheduler_tests/test_config.py` fail because `SchedulerConfig()` now raises:
```
RuntimeError: REDIS_URL must include credentials
```

The test environment sets `REDIS_URL=redis://localhost:6379` (no credentials), but the scheduler config validation (added per `docs/migrations/REDIS_AUTH.md`) now requires credentials in the URL.

Context

Discovered via full test suite run on 2026-05-10. The Redis ACL enforcement was added to production config but the scheduler test fixtures were not updated to use a credentialed URL.

Acceptance Criteria

  • Update `tests/scheduler_tests/conftest.py` (or `test_config.py`) to set `REDIS_URL=redis://:testpassword@localhost:6379` before constructing `SchedulerConfig`
  • Alternatively, monkeypatch `SchedulerConfig._validate_redis_credentials` to skip the check in test context
  • `python -m pytest tests/scheduler_tests/test_config.py -v` reports 5 passed, 0 failed
  • No other scheduler tests are broken by the change

Technical Notes

The simplest fix is a `monkeypatch` or environment override in the test fixture:
```python
@pytest.fixture(autouse=True)
def redis_url_with_creds(monkeypatch):
monkeypatch.setenv("REDIS_URL", "redis://:testpassword@localhost:6379")
```

Or update the existing `REDIS_URL` env var in `tests/scheduler_tests/conftest.py` if one is already set there.

Activity

  1. added
    priority-p1
    type-bug
    on May 10, 2026
  2. vybe commented on May 10, 2026

    @vybe
    ContributorAuthor

    /claim

  3. added
    status-in-progress
    on May 10, 2026
  4. github-actions commented on May 10, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/755-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #755
  5. added
    status-in-dev
    and removed
    status-in-progress
    on May 10, 2026
  6. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  7. added
    theme-devex
    and removed
    status-in-dev
    on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority-p1theme-devextype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions