Skip to content

Share single DynamoDB container across tests with per-test tables - #24

Merged
bpalermo merged 1 commit into
mainfrom
refactor/ddb-test-shared-container
Mar 7, 2026
Merged

bpalermo merged 1 commit into
mainfrom
refactor/ddb-test-shared-container

Conversation

@bpalermo

@bpalermo bpalermo commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add WithTableName functional option to DynamoDBRegistry for configurable table names (backward compatible)
  • Refactor tests to use TestMain with a single shared DynamoDB Local container
  • Each test gets its own isolated table derived from t.Name()
  • Test runtime reduced from ~37s to ~8s (4.5x faster)

Test plan

  • All tests pass (bazel test //...)
  • DynamoDB integration tests pass with shared container

🤖 Generated with Claude Code

Add WithTableName option to DynamoDBRegistry to allow configuring the
table name. Use TestMain to start one DynamoDB Local container for the
entire test suite, with each test creating its own isolated table.

Reduces test runtime from ~37s to ~8s by eliminating per-test container
startup overhead.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@bpalermo
bpalermo merged commit eb5f3b3 into main Mar 7, 2026
3 checks passed
@bpalermo
bpalermo deleted the refactor/ddb-test-shared-container branch March 7, 2026 20:06
bpalermo added a commit that referenced this pull request Sep 13, 2026
…768)

Clears the two open Dependabot alerts on the site's Python closure:

  - #24 GHSA-9xwg-3r6f-jcx2 (medium): path traversal in the b64 extension
    lets an <img src> read files outside base_path. Affects <= 10.21.3,
    fixed in 11.0.0.
  - #25 GHSA-gm37-52c6-37mw (high): exponential-backtracking ReDoS in the
    caret, tilde, betterem, and magiclink inline processors. Affects
    <= 11.0.0, fixed in 11.0.1.

  pymdown-extensions 10.21.3 -> 11.0.2

Nothing else in the lock moved. pymdown-extensions is transitive via
mkdocs-material, so requirements.in now carries an explicit
`pymdown-extensions>=11.0.1` floor with the advisory ids. uv already
resolves 11.0.2 from mkdocs-material 9.7.7 alone (the pin in the lock was
simply stale), but the floor is what keeps a future resolution — and the
alert — from sliding back. Lock regenerated with the exact command in the
requirements.in header; MODULE.bazel.lock picks up the new pip hub wheels.

Verified:
  - bazel test //website:all -> //website:site_test PASSED (the strict
    mkdocs build, --strict, plus the third-party audit)
  - bazel build //website:site; untarred (149 files) and grepped for
    unpkg.com, cdn.jsdelivr.net, fonts.googleapis.com, fonts.gstatic.com,
    cdnjs.cloudflare.com, api.github.com -> 0 hits
  - make format-check -> clean
  - bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation
    //... -> clean


Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Co-authored-by: Claude Fable 5.1 <[email protected]>
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