Skip to content

Add integration pytest marker and live-server tests#94

Merged
zeevdr merged 1 commit into
mainfrom
feat/integration-tests
May 24, 2026
Merged

Add integration pytest marker and live-server tests#94
zeevdr merged 1 commit into
mainfrom
feat/integration-tests

Conversation

@zeevdr
Copy link
Copy Markdown
Member

@zeevdr zeevdr commented May 24, 2026

Summary

  • Closes the gap between unit-with-mocks and real server behavior by introducing a first-class `integration` pytest marker.
  • Tests auto-skip when `DECREE_TEST_ADDR` is unset, so the existing unit-test suite and CI remain unaffected.
  • Provides session-scoped fixtures that stand up a schema + tenant against the live server and clean up afterward.

Test plan

  • Unit tests still pass with no env var set — 227 passed, 13 integration tests skipped.
  • Lint and formatting clean (`make lint`).
  • Typecheck passes (`make typecheck`).
  • `make integration DECREE_TEST_ADDR=host:port` runs the live suite when a server is available.
  • CI integration job (workflow_dispatch) verified in YAML — builds server from `decree` repo, starts docker-compose, tears down.

Closes #72

- Register `integration` marker in pyproject.toml; auto-skip when
  DECREE_TEST_ADDR is unset so the unit-test suite is unaffected.
- Add session-scoped fixtures to conftest: grpc_channel, schema_stub,
  live_schema (creates + publishes schema, deletes on teardown),
  live_tenant (creates tenant, deletes on teardown).
- Add tests/test_integration.py covering sync and async ConfigClient:
  get/set (string, int, bool, float), get_all, set_many, set_null,
  NotFoundError, context-manager idiom.
- Add `make integration` target (requires DECREE_TEST_ADDR).
- Add optional integration job to CI (workflow_dispatch only): checks
  out decree, builds server image with registry cache, starts
  docker-compose, runs tests, tears down.

Closes #72

Co-Authored-By: Claude <noreply@anthropic.com>
@zeevdr zeevdr added this to the Beta Readiness milestone May 24, 2026
@zeevdr zeevdr added size: M Moderate — a day or two, clear scope priority: P2 Nice-to-have labels May 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zeevdr zeevdr merged commit ad823bc into main May 24, 2026
15 checks passed
@zeevdr zeevdr deleted the feat/integration-tests branch May 24, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: P2 Nice-to-have size: M Moderate — a day or two, clear scope

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration tests behind pytest marker

1 participant