Skip to content

chore(docs): record testcontainers decision for infrastructure tests - #210

Merged
yordis merged 1 commit into
mainfrom
yordis/docs-testcontainers
Jun 9, 2026
Merged

chore(docs): record testcontainers decision for infrastructure tests#210
yordis merged 1 commit into
mainfrom
yordis/docs-testcontainers

Conversation

@yordis

@yordis yordis commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

Infrastructure-backed tests currently depend on ad hoc Docker setup or shared local services, making results inconsistent across machines and CI. This ADR establishes a repeatable default so reviewers and contributors know when real infrastructure is required and when lighter test layers suffice.

Test plan

  • mise exec -- git diff --check
  • mise exec -- pnpm --dir docs docs:build

Made with Cursor

@cursor

cursor Bot commented Jun 9, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only change to ADR guidance; no runtime, auth, or application code is modified.

Overview
Adds ADR 0010 (Unit Tests First, Testcontainers Only When Necessary) as an accepted architecture decision and links it from docs/adr/index.md.

The ADR states that mocks, contract tests, and in-memory fakes stay the default; Testcontainers is only for cases where real infrastructure behavior (protocol, lifecycle, persistence, auth, cross-process integration, or regressions mocks cannot catch) must be asserted. It also defines fixture rules (dynamic ports, readiness, isolation, no manual docker run for automated tests), when not to use containers, and review/CI expectations (challenge heavy container use; CI needs a container runtime for those suites).

Reviewed by Cursor Bugbot for commit 99300f6. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yordis, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 6 minutes and 50 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7c977db9-d3af-404c-a621-281bd4cfaf6f

📥 Commits

Reviewing files that changed from the base of the PR and between 88d6ef5 and 99300f6.

📒 Files selected for processing (2)
  • docs/adr/0010-testcontainers-for-infrastructure-tests.md
  • docs/adr/index.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/docs-testcontainers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@yordis
yordis force-pushed the yordis/docs-testcontainers branch from 883c0b0 to 99300f6 Compare June 9, 2026 03:41
@yordis
yordis merged commit ff08186 into main Jun 9, 2026
4 checks passed
@yordis
yordis deleted the yordis/docs-testcontainers branch June 9, 2026 03:44
mariorha added a commit that referenced this pull request Jun 9, 2026
Brings in #207 (ADR taxonomy docs), #208 (derive error implementations
via thiserror), #210 (testcontainers ADR).

Conflict resolutions (converge to main's thiserror direction, keep
platform functionality):
- connect.rs: thiserror derive + keep AuthorizationViolation variant and
  platform's richer connect logic; MAX_RECONNECT_DELAY from crate::constants
- lease_config_error.rs: thiserror derive, keep platform tests
- verification_token.rs: thiserror derive; keep #[allow(dead_code)] on
  latest (lib/bin split makes it dead in the lib crate)
- provision.rs: typed ProvisionError { source: Box<dyn Error> }, keep
  platform's create-and-update behavior

Collateral fixes:
- trogon-wasm-runtime: anyhow pin =1.0.98 -> workspace (=1.0.102)
- acp-nats config.rs tests: AcpPrefixError is now an enum, match the variant

Verified: cargo build --workspace, all workspace tests compile, affected
crate tests pass, cargo clippy --workspace clean.
yordis added a commit that referenced this pull request Jun 18, 2026
…210)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
yordis added a commit that referenced this pull request Jun 22, 2026
Brings in #207 (ADR taxonomy docs), #208 (derive error implementations
via thiserror), #210 (testcontainers ADR).

Conflict resolutions (converge to main's thiserror direction, keep
platform functionality):
- connect.rs: thiserror derive + keep AuthorizationViolation variant and
  platform's richer connect logic; MAX_RECONNECT_DELAY from crate::constants
- lease_config_error.rs: thiserror derive, keep platform tests
- verification_token.rs: thiserror derive; keep #[allow(dead_code)] on
  latest (lib/bin split makes it dead in the lib crate)
- provision.rs: typed ProvisionError { source: Box<dyn Error> }, keep
  platform's create-and-update behavior

Collateral fixes:
- trogon-wasm-runtime: anyhow pin =1.0.98 -> workspace (=1.0.102)
- acp-nats config.rs tests: AcpPrefixError is now an enum, match the variant

Verified: cargo build --workspace, all workspace tests compile, affected
crate tests pass, cargo clippy --workspace clean.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant